git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4772
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#include "xbt/context.h"
#include "xbt/ex.h"
#include "xbt/context.h"
#include "xbt/ex.h"
-#if defined(JAVA_SIMGRID) || defined(CONTEXT_THREADS)
# include "xbt/xbt_os_thread.h"
#else
# include <ucontext.h>
# include "xbt/xbt_os_thread.h"
#else
# include <ucontext.h>
#else
# ifdef CONTEXT_THREADS
xbt_os_thread_t thread; /* a plain dumb thread (portable to posix or windows) */
#else
# ifdef CONTEXT_THREADS
xbt_os_thread_t thread; /* a plain dumb thread (portable to posix or windows) */
+ xbt_os_cond_t cond; /* the condition used to synchronize the process */
+ xbt_os_mutex_t mutex; /* the mutex used to synchronize the process */
# else
ucontext_t uc; /* the thread that execute the code */
char stack[STACK_SIZE];
# else
ucontext_t uc; /* the thread that execute the code */
char stack[STACK_SIZE];
ex_ctx_t *exception; /* exception container -- only in ucontext&java, os_threads deals with it for us otherwise */
# endif /* CONTEXT_THREADS */
#endif /* JAVA_SIMGRID */
ex_ctx_t *exception; /* exception container -- only in ucontext&java, os_threads deals with it for us otherwise */
# endif /* CONTEXT_THREADS */
#endif /* JAVA_SIMGRID */
-
- /* What we need to synchronize the process */
-#if defined(JAVA_SIMGRID) || defined(CONTEXT_THREADS)
- xbt_os_cond_t cond; /* the condition used to synchronize the process */
- xbt_os_mutex_t mutex; /* the mutex used to synchronize the process */
-#endif
/* What to run */
xbt_main_func_t code; /* the scheduled fonction */
/* What to run */
xbt_main_func_t code; /* the scheduled fonction */
int iwannadie; /* Set to true by the context when it wants to commit suicide */
int iwannadie; /* Set to true by the context when it wants to commit suicide */