- xbt_os_thread_set_extra_data(context);
- raw_swapcontext(
- &((smx_ctx_raw_t) context)->old_stack_top,
- ((smx_ctx_raw_t) context)->stack_top);
- xbt_os_thread_set_extra_data(NULL);
+ int i;
+ double tmax = 0;
+ new_sr = TRUE;
+ sr_count++;
+ for(i=0; i < NUM_THREADS; i++){
+ if(time_thread_sr[i] > tmax)
+ tmax = time_thread_sr[i];
+ }
+
+ for(i=0; i < NUM_THREADS; i++){
+ XBT_VERB("Time SR thread %u = %lf (max %lf)", i, time_thread_sr[i], tmax);
+ time_wasted_sr += tmax - time_thread_sr[i];
+ }
+
+ XBT_VERB("New scheduling round");
+}
+#else
+static void smx_ctx_raw_runall_serial(xbt_dynar_t processes)
+{
+ smx_process_t process;
+ unsigned int cursor;
+
+ xbt_dynar_foreach(processes, cursor, process) {
+ XBT_DEBUG("Schedule item %u of %lu",cursor,xbt_dynar_length(processes));
+ smx_ctx_raw_resume(process);
+ }
+ xbt_dynar_reset(processes);