summaryrefslogtreecommitdiff
path: root/tests/tests2/106_pthread.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2020-08-14 23:04:13 +0100
committerThomas Preud'homme <robotux@celest.fr>2020-08-14 23:04:13 +0100
commitafd09586d7ead4f146ad7a7a471be34196b3c6bc (patch)
tree87854be29fb4264b979b700fa45445f58faa4c26 /tests/tests2/106_pthread.c
parente2ccf3981d78dfeb390d22c74625b60310100abb (diff)
New upstream version 0.9.27+git20200814.62c30a4a
Diffstat (limited to 'tests/tests2/106_pthread.c')
-rw-r--r--tests/tests2/106_pthread.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/tests2/106_pthread.c b/tests/tests2/106_pthread.c
new file mode 100644
index 0000000..09308ed
--- /dev/null
+++ b/tests/tests2/106_pthread.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <pthread.h>
+#include <errno.h>
+
+int
+main(void)
+{
+ int ret;
+ pthread_condattr_t attr;
+ pthread_cond_t condition;
+
+ pthread_condattr_init (&attr);
+ pthread_condattr_setpshared (&attr, PTHREAD_PROCESS_SHARED);
+ printf ("%s\n", pthread_cond_init (&condition, &attr) ? "fail":"ok");
+ pthread_condattr_destroy (&attr);
+ return 0;
+}