summaryrefslogtreecommitdiff
path: root/tests/condvar3_2.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-10-22 15:06:41 +0000
committerrpj <rpj>2004-10-22 15:06:41 +0000
commit045278e11b53fc1ad59945427feab1cd9275988f (patch)
treeda8570a7a8962d9563814c4910e8a9d5fb6fa685 /tests/condvar3_2.c
parentf84df26e12431bb9ecd07fbc52c804538635901f (diff)
Changes to mutexes and semaphores - considered alpha for now
Diffstat (limited to 'tests/condvar3_2.c')
-rw-r--r--tests/condvar3_2.c8
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;
}