From a3ea0b24409b89bd08c0a2268dbae834724734df Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 20 Jun 2010 03:31:18 +0000 Subject: See ChangeLogs: preparing for new release. --- pthread_barrier_init.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'pthread_barrier_init.c') diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index dc1b50c..618bfae 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -55,25 +55,13 @@ pthread_barrier_init (pthread_barrier_t * barrier, ? (*attr)->pshared : PTHREAD_PROCESS_PRIVATE); b->nCurrentBarrierHeight = b->nInitialBarrierHeight = count; - b->iStep = 0; + b->lock = 0; - /* - * Two semaphores are used in the same way as two stepping - * stones might be used in crossing a stream. Once all - * threads are safely on one stone, the other stone can - * be moved ahead, and the threads can start moving to it. - * If some threads decide to eat their lunch before moving - * then the other threads have to wait. - */ - if (0 == sem_init (&(b->semBarrierBreeched[0]), b->pshared, 0)) - { - if (0 == sem_init (&(b->semBarrierBreeched[1]), b->pshared, 0)) + if (0 == sem_init (&(b->semBarrierBreeched), b->pshared, 0)) { *barrier = b; return 0; } - (void) sem_destroy (&(b->semBarrierBreeched[0])); - } (void) free (b); } -- cgit v1.2.3