From 19299847fdd32094b28377db1aea61b0f605dc8b Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 1 Jul 2001 13:49:38 +0000 Subject: 2001-07-01 Ross Johnson Contributed by - Alexander Terekhov. * condvar.c: Fixed lost signal bug reported by Timur Aydin (taydin@snet.net). [RPJ (me) didn't translate the original algorithm correctly.] * semaphore.c: Added sem_post_multiple; this is a useful routine, but it doesn't appear to be standard. For now it's not an exported function. tests/ChangeLog: 2001-07-01 Ross Johnson * benchtest3.c: New; timing mutexes. * benchtest4.c: New; time mutexes. * condvar3_1.c: Fixed bug - Alexander Terekhov * condvar3_3.c: New test. 2001-06-25 Ross Johnson * priority1.c: New test. * priority2.c: New test. * inherit1.c: New test. * benchtest1.c: New; timing mutexes. * benchtest2.c: New; timing mutexes. * mutex4.c: Modified to test all mutex types. --- tests/condvar3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/condvar3.c') diff --git a/tests/condvar3.c b/tests/condvar3.c index 673feb5..ef71946 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -59,13 +59,19 @@ enum { void * mythread(void * arg) { + int result = 0; + assert(pthread_mutex_lock(&mutex) == 0); shared++; assert(pthread_mutex_unlock(&mutex) == 0); - assert(pthread_cond_signal(&cv) == 0); + if ((result = pthread_cond_signal(&cv)) != 0) + { + printf("Error = %s\n", error_string[result]); + } + assert(result == 0); return (void *) 0; } -- cgit v1.2.3