diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mutex3.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/mutex3.c b/tests/mutex3.c new file mode 100644 index 0000000..2bb6106 --- /dev/null +++ b/tests/mutex3.c @@ -0,0 +1,12 @@ +#include <pthread.h> + +pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + +int +main() +{ + pthread_mutex_lock(&mutex); + /* do stuff */ + pthread_mutex_unlock(&mutex); + return 0; +} |