diff options
author | rpj <rpj> | 2004-10-22 15:06:41 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-10-22 15:06:41 +0000 |
commit | 045278e11b53fc1ad59945427feab1cd9275988f (patch) | |
tree | da8570a7a8962d9563814c4910e8a9d5fb6fa685 /tests/condvar3_2.c | |
parent | f84df26e12431bb9ecd07fbc52c804538635901f (diff) |
Changes to mutexes and semaphores - considered alpha for now
Diffstat (limited to 'tests/condvar3_2.c')
-rw-r--r-- | tests/condvar3_2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 865ca9d..525ddf6 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -160,10 +160,16 @@ main() * and while some are still waking up after timeout. * Also tests that redundant broadcasts don't return errors. */ + + assert(pthread_mutex_lock(&mutex) == 0); + if (awoken > NUMTHREADS/3) { assert(pthread_cond_broadcast(&cv) == 0); } + + assert(pthread_mutex_unlock(&mutex) == 0); + } assert(awoken == NUMTHREADS - timedout); @@ -181,5 +187,7 @@ main() assert(result == 0); } + assert(pthread_mutex_destroy(&mutex) == 0); + return 0; } |