Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
get_pid() for Windows is GetCurrentProcess()
[simgrid.git] / src / gras / Virtu / rl_process.c
index 1318080..fdb33f1 100644 (file)
@@ -30,7 +30,11 @@ const char *xbt_procname(void) {
 }
 
 long int gras_os_getpid(void) {
 }
 
 long int gras_os_getpid(void) {
-  return (long int) getpid();
+       #ifdef _WIN32
+       return (long int) GetCurrentProcess();
+       #else
+       return (long int) getpid();
+       #endif
 }
 
 /* **************************************************************************
 }
 
 /* **************************************************************************