Fixed to compile and run on origin2000 and origin-pthreads.
[charm.git] / src / arch / origin-pthreads / machine.c
index 18f8e648d971fa739315ab4c64aea1115357cf4a..1f318a391589a271ffc5a4a5ce8521fa4ee63862 100644 (file)
@@ -3,9 +3,6 @@
 #include <sched.h>
 #include <time.h>
 
-#define _POSIX1C
-#define _NO_ANSIMODE
-
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/time.h>
@@ -97,7 +94,7 @@ void CmiDestroyLock(CmiNodeLock lock)
 
 int CmiMyPe()
 {
-  int mype = (int) pthread_getspecific(perThreadKey);
+  int mype = (size_t) pthread_getspecific(perThreadKey);
   return mype;
 }
 
@@ -217,6 +214,7 @@ static void *threadInit(void *arg)
     if (Cmi_usched==0) CsdScheduler(-1);
     ConverseExit();
   }
+  return (void *) 0;
 }