git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3274
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#include "xbt/log.h"
#include "xbt/dynar.h"
#include "xbt/xbt_thread.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include "xbt/xbt_thread.h"
-#include <pthread.h> // I need pthread_join that is not yet available in xbt_thread.
+/*#include <pthread.h>*/ /* I need pthread_join that is not yet available in xbt_thread.*/
#ifdef CONTEXT_THREADS
/* This file (context.c) is only loaded in libsimgrid, not libgras.
#ifdef CONTEXT_THREADS
/* This file (context.c) is only loaded in libsimgrid, not libgras.
if (!context) return;
DEBUG1("Freeing %p",context);
#ifdef CONTEXT_THREADS
if (!context) return;
DEBUG1("Freeing %p",context);
#ifdef CONTEXT_THREADS
- DEBUG1("\t joining %p",(void *)context->thread->t);
- pthread_join(context->thread->t,NULL);
+ /*DEBUG1("\t joining %p",(void *)context->thread->t);*/
+ DEBUG1("\t joining %p",(void *)context->thread);
+ /*pthread_join(context->thread->t,NULL);*/
+ xbt_thread_join(context->thread,NULL);
DEBUG1("\t xbt_free %p",(void *)context->thread);
xbt_free(context->thread);
DEBUG1("\t mutex_destroy %p",(void *)context->mutex);
DEBUG1("\t xbt_free %p",(void *)context->thread);
xbt_free(context->thread);
DEBUG1("\t mutex_destroy %p",(void *)context->mutex);