File: common.h

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (30 lines) | stat: -rw-r--r-- 673 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: BSD-2-Clause */
#ifndef COMMON_H_
#define COMMON_H_

#define __weak __attribute__((weak))
#define __optimize __attribute__((optimize(2)))
#ifndef __always_inline
#define __always_inline inline __attribute__((always_inline))
#endif

/* Struct-by-value USDT argument currently only works on x86_64 with gcc
 * See: https://github.com/bpftrace/bpftrace/issues/3798
 */
#if defined(__clang__) || defined(__aarch64__)
  #define ALLOW_STRUCT_BY_VALUE_TEST 0
#else
  #define ALLOW_STRUCT_BY_VALUE_TEST 1
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern int handle_args(int argc, char **argv);

#ifdef __cplusplus
}
#endif

#endif /* COMMON_H_ */