summaryrefslogtreecommitdiff
path: root/tests/condvar3.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-07-01 13:49:38 +0000
committerrpj <rpj>2001-07-01 13:49:38 +0000
commit19299847fdd32094b28377db1aea61b0f605dc8b (patch)
tree6790f92e1c0d67063edccf82a57616f977633aef /tests/condvar3.c
parenta311086d622d3c778e1da57cfae167c0ab1c0fb4 (diff)
2001-07-01 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
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 <rpj@special.ise.canberra.edu.au> * 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 <rpj@special.ise.canberra.edu.au> * 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.
Diffstat (limited to 'tests/condvar3.c')
-rw-r--r--tests/condvar3.c8
1 files changed, 7 insertions, 1 deletions
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;
}