2 * Test program that locks and unlocks a process-shared mutex.
3 * See also https://bugs.kde.org/show_bug.cgi?id=187048.
15 pthread_mutex_t mutex
;
16 pthread_mutexattr_t attr
;
18 pthread_mutexattr_init(&attr
);
19 pthread_mutexattr_setpshared(&attr
, PTHREAD_PROCESS_SHARED
);
20 pthread_mutex_init(&mutex
, &attr
);
21 pthread_mutexattr_destroy(&attr
);
23 pthread_mutex_lock(&mutex
);
24 pthread_mutex_unlock(&mutex
);
25 pthread_mutex_destroy(&mutex
);
27 fprintf(stderr
, "Finished.\n");