summaryrefslogtreecommitdiffstats
path: root/tools/build/feature/test-pthread-barrier.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/feature/test-pthread-barrier.c')
-rw-r--r--tools/build/feature/test-pthread-barrier.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/build/feature/test-pthread-barrier.c b/tools/build/feature/test-pthread-barrier.c
new file mode 100644
index 000000000000..0558d9334d97
--- /dev/null
+++ b/tools/build/feature/test-pthread-barrier.c
@@ -0,0 +1,12 @@
+// 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);
+}