From: alegrand Date: Mon, 28 Feb 2005 20:02:50 +0000 (+0000) Subject: Stupid me ! X-Git-Tag: v3.3~4240 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/df697dbf8475c3c6fc2a86661ec18ccaad10517b?hp=82edbc1fc4657623c61feb396e2cdd443bcc1556 Stupid me ! git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1113 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/context.c b/src/xbt/context.c index d62813704e..f5af18b1f6 100644 --- a/src/xbt/context.c +++ b/src/xbt/context.c @@ -102,6 +102,7 @@ static void *__context_wrapper(void *c) int i; #ifdef USE_PTHREADS + pthread_mutex_lock(&(context->mutex)); pthread_cond_wait(&(context->cond), &(context->mutex)); pthread_mutex_unlock(&(context->mutex)); #endif @@ -167,8 +168,6 @@ void xbt_context_empty_trash(void) void xbt_context_start(xbt_context_t context) { #ifdef USE_PTHREADS - pthread_mutex_lock(&(context->mutex)); - /* Launch the thread */ xbt_assert0(!pthread_create(context->thread, NULL, __context_wrapper, context), "Unable to create a thread.");