Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the way the Process are killed, since we need the java stack to be empty ...
[simgrid.git] / src / smx_context_java.h
index c95f15b..d0578f0 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <xbt/misc.h>
 #include <simgrid/simix.h>
+#include <xbt/xbt_os_thread.h>
+
 #include "jmsg.h"
 #include "jmsg_process.h"
 
@@ -18,11 +20,15 @@ typedef struct s_smx_ctx_java {
   s_smx_ctx_base_t super;       /* Fields of super implementation */
   jobject jprocess;             /* the java process instance binded with the msg process structure */
   JNIEnv *jenv;                 /* jni interface pointer associated to this thread */
+  xbt_os_thread_t thread;
+  xbt_os_sem_t begin;           /* this semaphore is used to schedule/yield the process  */
+  xbt_os_sem_t end;             /* this semaphore is used to schedule/unschedule the process   */
+  int killed;
 } s_smx_ctx_java_t, *smx_ctx_java_t;
 
 void SIMIX_ctx_java_factory_init(smx_context_factory_t *factory);
 void smx_ctx_java_stop(smx_context_t context);
-
+smx_context_t smx_ctx_java_self(void);
 SG_END_DECL()
 
 #endif                          /* !_XBT_CONTEXT_JAVA_H */