- #ifdef USE_PTHREADS
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_t *thread; /* the thread that execute the code */
- #elif defined(USE_WIN_THREADS)
- win_thread_cond_t cond;
- win_thread_mutex_t mutex;
- win_thread_t thread; /* the thread that execute the code */
- #else
- ucontext_t uc; /* the thread that execute the code */
+ char *name;
+
+ /* Declaration of the thread running the process */
+#ifdef JAVA_SIMGRID /* come first because other ones are defined too */
+ jobject jprocess; /* the java process instance */
+ JNIEnv* jenv; /* jni interface pointer for this thread */
+ ex_ctx_t *exception; /* exception container -- only in ucontext&java, os_threads deals with it for us otherwise */
+#else
+# ifdef CONTEXT_THREADS
+ xbt_os_thread_t thread; /* a plain dumb thread (portable to posix or windows) */
+ xbt_os_sem_t begin; /* this semaphore is used to schedule/unschedule the process */
+ xbt_os_sem_t end; /* this semaphore is used to schedule/unschedule the process */
+# else
+ ucontext_t uc; /* the thread that execute the code */