Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Create current_property_set only if it is required.
[simgrid.git] / src / simix / smx_context_sysv.c
index 18cd39f..9283f62 100644 (file)
@@ -54,7 +54,7 @@ union u_ctx_addr {
 void SIMIX_ctx_sysv_factory_init(smx_context_factory_t *factory)
 {
   smx_ctx_base_factory_init(factory);
-  VERB0("Activating SYSV context factory");
+  XBT_VERB("Activating SYSV context factory");
 
   (*factory)->finalize = smx_ctx_sysv_factory_finalize;
   (*factory)->create_context = smx_ctx_sysv_create_context;
@@ -188,7 +188,8 @@ void smx_ctx_sysv_wrapper(int first, ...)
 void smx_ctx_sysv_suspend(smx_context_t context)
 {
   smx_current_context = (smx_context_t)maestro_context;
-  int rv = swapcontext(&((smx_ctx_sysv_t) context)->uc, &((smx_ctx_sysv_t)context)->old_uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t) context)->uc, &((smx_ctx_sysv_t)context)->old_uc);
 
   xbt_assert0((rv == 0), "Context swapping failure");
 }
@@ -196,7 +197,8 @@ void smx_ctx_sysv_suspend(smx_context_t context)
 void smx_ctx_sysv_resume(smx_context_t context)
 {
   smx_current_context = context; 
-  int rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
 
   xbt_assert0((rv == 0), "Context swapping failure");
 }
@@ -207,7 +209,7 @@ void smx_ctx_sysv_runall(xbt_dynar_t processes)
   unsigned int cursor;
 
   xbt_dynar_foreach(processes, cursor, process) {
-    DEBUG2("Schedule item %u of %lu",cursor,xbt_dynar_length(processes));
+    XBT_DEBUG("Schedule item %u of %lu",cursor,xbt_dynar_length(processes));
     smx_ctx_sysv_resume(process->context);
   }
   xbt_dynar_reset(processes);
@@ -217,7 +219,8 @@ void smx_ctx_sysv_resume_parallel(smx_process_t process)
 {
   smx_context_t context = process->context;
   smx_current_context = (smx_context_t)context;
-  int rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
   smx_current_context = (smx_context_t)maestro_context;
 
   xbt_assert0((rv == 0), "Context swapping failure");