git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1124
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
int i;
#ifdef USE_PTHREADS
int i;
#ifdef USE_PTHREADS
+ DEBUG0("**** Lock ****");
pthread_mutex_lock(&(context->mutex));
pthread_mutex_lock(&(context->mutex));
+ DEBUG0("**** Releasing the prisonner ****");
pthread_cond_signal(&(context->cond));
pthread_cond_signal(&(context->cond));
+ DEBUG0("**** Going to Jail ****");
pthread_cond_wait(&(context->cond), &(context->mutex));
pthread_cond_wait(&(context->cond), &(context->mutex));
+ DEBUG0("**** Unlocking ****");
pthread_mutex_unlock(&(context->mutex));
#endif
pthread_mutex_unlock(&(context->mutex));
#endif
{
#ifdef USE_PTHREADS
/* Launch the thread */
{
#ifdef USE_PTHREADS
/* Launch the thread */
+ DEBUG0("**** Locking ****");
pthread_mutex_lock(&(context->mutex));
pthread_mutex_lock(&(context->mutex));
+ DEBUG0("**** Pthread create ****");
xbt_assert0(!pthread_create(context->thread, NULL, __context_wrapper, context),
"Unable to create a thread.");
xbt_assert0(!pthread_create(context->thread, NULL, __context_wrapper, context),
"Unable to create a thread.");
+ DEBUG0("**** Going to jail ****");
pthread_cond_wait(&(context->cond), &(context->mutex));
pthread_cond_wait(&(context->cond), &(context->mutex));
+ DEBUG0("**** Unlocking ****");
pthread_mutex_unlock(&(context->mutex));
#else
makecontext (&(context->uc), (void (*) (void)) __context_wrapper,
pthread_mutex_unlock(&(context->mutex));
#else
makecontext (&(context->uc), (void (*) (void)) __context_wrapper,