Unified · Split
| @@ -0,0 +1,17 @@ | ||
| 1 | +#include <stdio.h> | |
| 2 | +#include <pthread.h> | |
| 3 | +#include <errno.h> | |
| 4 | + | |
| 5 | +int | |
| 6 | +main(void) | |
| 7 | +{ | |
| 8 | + int ret; | |
| 9 | + pthread_condattr_t attr; | |
| 10 | + pthread_cond_t condition; | |
| 11 | + | |
| 12 | + pthread_condattr_init (&attr); | |
| 13 | + pthread_condattr_setpshared (&attr, PTHREAD_PROCESS_SHARED); | |
| 14 | + printf ("%s\n", pthread_cond_init (&condition, &attr) ? "fail":"ok"); | |
| 15 | + pthread_condattr_destroy (&attr); | |
| 16 | + return 0; | |
| 17 | +} | |
| @@ -0,0 +1 @@ | ||
| 1 | +ok | |