X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/89f1cc65397f33d62a434e22d4c4a21c6c889f15..3802cdd96c23984d0ca4431322a3755c3ed9ef8c:/src/smx_context_java.h diff --git a/src/smx_context_java.h b/src/smx_context_java.h index d801dc3c57..084c5d4ade 100644 --- a/src/smx_context_java.h +++ b/src/smx_context_java.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010. The SimGrid Team. +/* Copyright (c) 2009, 2010, 2012. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,7 +8,9 @@ #define _XBT_CONTEXT_JAVA_H #include -#include +#include +#include + #include "jmsg.h" #include "jmsg_process.h" @@ -18,10 +20,14 @@ 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 */ } 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 */