- surf_solve(); /* Takes traces into account. Returns 0.0 */
- while (xbt_fifo_size(msg_global->process_list)) {
- while ((process = xbt_fifo_pop(msg_global->process_to_run))) {
- msg_global->current_process = process;
- xbt_context_yield(process->simdata->context);
- msg_global->current_process = NULL;
- }
- Before = MSG_getClock();
- elapsed_time = surf_solve();
- Now = MSG_getClock();
-
- if (elapsed_time==0.0)
- break;
-
-/* /\* Handle Failures *\/ */
-/* { */
-/* xbt_fifo_t failedHostList = MSG_buildFailedHostList(Before,Now); */
-/* m_host_t host = NULL; */
-/* TBX_HashTable_Bucket_t b; */
-/* TBX_HashTable_t failedProcessList = TBX_HashTable_newList(); */
-
-/* while((host=xbt_fifo_pop(failedHostList))) { */
-/* simdata_host_t h_simdata= host->simdata; */
-/* TBX_HashTable_t process_list= h_simdata->process; */
-
-/* h_simdata->state = HOST_DOWN; */
-
-/* for (b=TBX_HashTable_getFirstBucket(process_list);b; */
-/* b=TBX_HashTable_getNextBucket(process_list,b)) { */
-/* m_process_t p = b->content; */
-/* simdata_process_t p_simdata = p->simdata; */
-
-/* if(!TBX_HashTable_isInList(failedProcessList,p,TBX_basicHash)) */
-/* TBX_HashTable_insert(failedProcessList,p,TBX_basicHash); */
-
-/* fprintf(stderr,"MSG: %s(%d) on %s(%d): Has died while ", */
-/* p->name,p_simdata->PID, */
-/* p_simdata->host->name,h_simdata->PID); */
-/* for (i=0; i<msg_global->max_channel; i++) { */
-/* if (h_simdata->sleeping[i] == p_simdata->context) { */
-/* fprintf(stderr,"listening on channel %d.\n",i); */
-/* break; */
-/* } */
-/* } */
-/* if (i==msg_global->max_channel) { */
-/* if(p_simdata->waiting_task) { */
-/* fprintf(stderr,"waiting for %s to finish.\n",p_simdata->waiting_task->name); */
-/* MarkAsFailed(p_simdata->waiting_task,failedProcessList); */
-/* } else { /\* Must be trying to put a task somewhere *\/ */
-/* if(p_simdata->put_host) { */
-/* fprintf(stderr,"trying to send a task on Host %s, channel %d.\n", */
-/* p_simdata->put_host->name, p_simdata->put_channel); */
-/* } else { */
-/* fprintf(stderr,"... WTF! UNKNOWN STATUS. Please report this bug.\n"); */
-/* } */
-/* } */
-/* } */
-/* } */
-/* } */
-/* xbt_fifo_freeFIFO(failedHostList); */
-/* for (b=TBX_HashTable_getFirstBucket(failedProcessList);b; */
-/* b=TBX_HashTable_getNextBucket(failedProcessList,b)) { */
-/* m_process_t p = b->content; */
-/* xbt_fifo_insert(msg_global->process_to_run, p); /\* Brutal... *\/ */
-/* } */
-/* TBX_HashTable_freeList(failedProcessList,NULL); */
-/* } */
-
-
- {
- surf_action_t action = NULL;
- surf_resource_t resource = NULL;
-
- xbt_dynar_foreach(resource_list, i, resource) {
- while ((action =
- xbt_swag_extract(resource->common_public->states.
- failed_action_set))) {
-/* xbt_fifo_insert(msg_global->process_to_run, process); */
- }
- while ((action =
- xbt_swag_extract(resource->common_public->states.
- done_action_set))) {
-/* xbt_fifo_insert(msg_global->process_to_run, process); */
- }