Debian Codegraph @

src/include/bionic.h

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 #ifndef BIONIC_H
3 #define BIONIC_H
4
5 #ifdef PTHREAD_BIONIC
6 #warning Program is being compiled with PTHREAD_BIONIC, some options may behave erratically.
7
8 /*
9 * We do not have pthread_barrier_t available, but since we are not
10 * going to use them for anything useful, just typedef them to int
11 */
12 typedef int pthread_barrier_t;
13 typedef int pthread_barrierattr_t;
14
15 #ifndef PTHREAD_BARRIER_SERIAL_THREAD
16 #define PTHREAD_BARRIER_SERIAL_THREAD 0
17 #endif
18
19 static inline int pthread_barrier_wait(pthread_barrier_t *barrier)
20 {
21 return PTHREAD_BARRIER_SERIAL_THREAD;
22 }
23
24 static inline int pthread_barrier_destroy(pthread_barrier_t *barrier)
25 {
26 return 0;
27 }
28 static inline int pthread_barrier_init(pthread_barrier_t * barrier,
29 const pthread_barrierattr_t * attr,
30 unsigned count)
31 {
32 return 0;
33 }
34
35 static inline int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
36 const cpu_set_t *cpuset)
37 {
38 return sched_setaffinity(0, cpusetsize, cpuset);
39 }
40
41 #endif /* PTHREAD_BIONIC */
42
43 #endif /* BIONIC_H */