Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] merging instr_variables.c into instr_interface.c (code re-organization)
[simgrid.git] / src / simix / smx_smurf.c
index 59297c5..475b3fb 100644 (file)
@@ -37,12 +37,14 @@ void SIMIX_request_push()
     if (_surf_parallel_contexts)
       xbt_os_mutex_acquire(sync_req_positions);
     xbt_heap_push(req_todo,&issuer->request,issuer->pid);
-    DEBUG3("Pushed request %d of %s; now %d requests waiting",
-        issuer->request.call,issuer->name,xbt_heap_size(req_todo));
+    DEBUG4("Pushed request %s (%d) of %s; now %d requests waiting",
+        SIMIX_request_name(issuer->request.call), issuer->request.call,
+        issuer->name,xbt_heap_size(req_todo));
     if (_surf_parallel_contexts)
       xbt_os_mutex_release(sync_req_positions);
 
-    DEBUG2("Yield process '%s' on request of type %d", issuer->name, issuer->request.call);
+    DEBUG3("Yield process '%s' on request of type %s (%d)", issuer->name,
+        SIMIX_request_name(issuer->request.call), issuer->request.call);
     SIMIX_process_yield();
   } else {
     SIMIX_request_pre(&issuer->request);
@@ -58,7 +60,7 @@ void SIMIX_request_answer(smx_req_t req)
 {
   if (req->issuer != simix_global->maestro_process){
     req->issuer->request.call = REQ_NO_REQ;
-    xbt_swag_insert(req->issuer, simix_global->process_to_run);
+    xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, req->issuer);
   }
 }
 
@@ -105,7 +107,10 @@ void SIMIX_request_pre(smx_req_t req)
 {
   switch (req->call) {
   case REQ_NO_REQ:
-    xbt_die("Asked to do the noop syscall");
+    THROW2(arg_error,0,"Asked to do the noop syscall on %s@%s",
+        SIMIX_process_get_name(req->issuer),
+        SIMIX_host_get_name(SIMIX_process_get_host(req->issuer))
+        );
     break;
 
     case REQ_HOST_GET_BY_NAME: