Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill some misplaced portability bits, leftover from the conversion from OS synchroniz...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 13:17:12 +0000 (13:17 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 13:17:12 +0000 (13:17 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4784 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/jmsg.c
src/java/jmsg.h

index c55aab6..d40d249 100644 (file)
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(jmsg,"MSG for Java(TM)");
 
-/* header for windows */
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <pthread.h>
-#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);
        
 }
 
index 34b8e72..d38fa2c 100644 (file)
@@ -15,9 +15,6 @@
 
 #include <jni.h>
 
-int
-is_main_thread(void);
-
 JavaVM *
 get_java_VM(void);