diff options
Diffstat (limited to 'tests/tests2/106_pthread.c')
-rw-r--r-- | tests/tests2/106_pthread.c | 17 |
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; +} |