From: mquinson Date: Thu, 4 Oct 2007 13:17:12 +0000 (+0000) Subject: kill some misplaced portability bits, leftover from the conversion from OS synchroniz... X-Git-Tag: v3.3~1007 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4664c9757fb743652b03460ca4a08957cc0a249d kill some misplaced portability bits, leftover from the conversion from OS synchronization to java one git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4784 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/java/jmsg.c b/src/java/jmsg.c index c55aab6098..d40d249d78 100644 --- a/src/java/jmsg.c +++ b/src/java/jmsg.c @@ -23,34 +23,10 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(jmsg,"MSG for Java(TM)"); -/* header for windows */ -#ifdef WIN32 -#include -#else -#include -#endif - #include "jmsg.h" static JavaVM * __java_vm = NULL; - -#ifdef WIN32 - static DWORD __current_thread_id = 0; - - int is_main_thread() { - return (GetCurrentThreadId() == __current_thread_id); - } - -#else /* !WIN32 */ - - static pthread_t __current_thread_id = 0; - - int is_main_thread() { - return (pthread_self() == __current_thread_id); - } -#endif - JavaVM * get_java_VM(void) { return __java_vm; @@ -1061,13 +1037,7 @@ Java_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs) { free(argv); -#ifdef WIN32 - __current_thread_id = GetCurrentThreadId(); -#else - __current_thread_id = pthread_self(); -#endif - -(*env)->GetJavaVM(env,&__java_vm); + (*env)->GetJavaVM(env,&__java_vm); } diff --git a/src/java/jmsg.h b/src/java/jmsg.h index 34b8e72f15..d38fa2cd6e 100644 --- a/src/java/jmsg.h +++ b/src/java/jmsg.h @@ -15,9 +15,6 @@ #include -int -is_main_thread(void); - JavaVM * get_java_VM(void);