Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MSG_process_resume did not work if you tried to resume yourself.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 1 Jul 2005 18:10:11 +0000 (18:10 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 1 Jul 2005 18:10:11 +0000 (18:10 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1520 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/m_process.c

index ace1951..ee04314 100644 (file)
@@ -399,8 +399,11 @@ MSG_error_t MSG_process_resume(m_process_t process)
   xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters");
   CHECK_HOST();
 
   xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters");
   CHECK_HOST();
 
-  simdata = process->simdata;
+  if(process == MSG_process_self()) {
+    MSG_RETURN(MSG_OK);
+  }
 
 
+  simdata = process->simdata;
 
   if(simdata->blocked) {
     PAJE_PROCESS_POP_STATE(process);
 
   if(simdata->blocked) {
     PAJE_PROCESS_POP_STATE(process);