diff options
Diffstat (limited to 'tests/mutex1.c')
-rw-r--r-- | tests/mutex1.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/mutex1.c b/tests/mutex1.c index 27e2a82..f1c9240 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -12,9 +12,20 @@ pthread_mutex_t mutex1; int main() { - pthread_mutex_init(&mutex1, NULL); - pthread_mutex_lock(&mutex1); - pthread_mutex_unlock(&mutex1); + if (pthread_mutex_init(&mutex1, NULL) != 0) + { + return 1; + } + + if (pthread_mutex_lock(&mutex1) != 0) + { + return 1; + } + + if (pthread_mutex_unlock(&mutex1) != 0) + { + return 1; + } return 0; } |