From f58aab44e671bb39b8afb29804a9ca94c238c523 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 8 Jul 2001 16:44:06 +0000 Subject: Barriers fixed and tested more extensively. * barrier.c: Fix several bugs in all routines. Now passes tests/barrier5.c which is fairly rigorous. There is still a non-optimal work-around for a race condition between the barrier breeched event signal and event wait. Basically the last (signalling) thread to hit the barrier yields to allow any other threads, which may have lost the race, to complete. tests/ChangeLog: * barrier3.c: Fixed. * barrier4.c: Fixed. * barrier5.c: New; proves that all threads in the group reaching the barrier wait and then resume together. Repeats the test using groups of 1 to 16 threads. Each group of threads must negotiate a large number of barriers (10000). * spin4.c: Fixed. * test.h (error_string): Modified the success (0) value. --- condvar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'condvar.c') diff --git a/condvar.c b/condvar.c index 1f2de22..55f0960 100644 --- a/condvar.c +++ b/condvar.c @@ -807,7 +807,7 @@ ptw32_cond_wait_cleanup(void * args) } /* ptw32_cond_wait_cleanup */ -static int +static INLINE int ptw32_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime) @@ -912,7 +912,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, } /* ptw32_cond_timedwait */ -static int +static INLINE int ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) /* -- cgit v1.2.3