+/* This function is called when a simulated process wants to yield back to the maestro in a blocking simcall.
+ * This naturally occurs within SIMIX_context_suspend(self->context), called from SIMIX_process_yield()
+ * Actually, it does not really yield back to maestro, but into the next process that must be executed.
+ * If no one is to be executed, then it yields to the initial soul that was in this working thread (that was saved in resume_parallel).
+ */
+static void smx_ctx_sysv_suspend_parallel(smx_context_t context) {
+#ifdef CONTEXT_THREADS
+ /* determine the next context */
+ smx_process_t next_work = xbt_parmap_next(sysv_parmap); // get the next soul to embody now
+ smx_context_t next_context;
+ ucontext_t* next_stack; // will contain the next soul to run, either simulated or initial minion's one
+
+ if (next_work != NULL) { // there is a next soul to embody (ie, a next process to resume)
+ XBT_DEBUG("Run next process");
+ next_context = next_work->context;
+ }
+ else {
+ /* all processes were run, go to the barrier */
+ XBT_DEBUG("No more processes to run");
+ unsigned long worker_id = // Get back the identity of my body that was stored when starting the scheduling round
+ (unsigned long) xbt_os_thread_get_specific(sysv_worker_id_key);
+ next_context = (smx_context_t)sysv_workers_context[worker_id]; // deduce the initial soul of that body
+ // When given that soul, the body will wait for the next scheduling round
+ }
+
+ next_stack = &((smx_ctx_sysv_t)next_context)->uc;
+
+ SIMIX_context_set_current(next_context);
+ swapcontext(&((smx_ctx_sysv_t) context)->uc, next_stack); // get that next soul
+#endif