Files
linux/tools/build/feature/test-pthread-barrier.c
T
Arnaldo Carvalho de Melo 25ab5abf5b tools build feature: Check if pthread_barrier_t is available
As 'perf bench futex wake-parallel" will use this, which is not
available in older systems such as versions of the android NDK used in
my container build tests (r12b and r15c at the moment).

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: James Yang <[email protected]
Cc: Jiri Olsa <[email protected]>
Cc: Kim Phillips <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-12-05 10:21:59 -03:00

13 lines
244 B
C

// SPDX-License-Identifier: GPL-2.0
#include <stdint.h>
#include <pthread.h>
int main(void)
{
pthread_barrier_t barrier;
pthread_barrier_init(&barrier, NULL, 1);
pthread_barrier_wait(&barrier);
return pthread_barrier_destroy(&barrier);
}