-static void smx_ctx_sysv_stop(smx_context_t context);
-static void smx_ctx_sysv_suspend(smx_context_t context);
-static void smx_ctx_sysv_resume(smx_context_t new_context);
-
-static void smx_ctx_sysv_wrapper(void);
+static smx_context_t
+smx_ctx_sysv_create_context(xbt_main_func_t code, int argc, char **argv,
+ void_pfn_smxprocess_t cleanup_func, void* data);
+
+static void smx_ctx_sysv_wrapper(int count, ...);
+
+static void smx_ctx_sysv_stop_serial(smx_context_t context);
+static void smx_ctx_sysv_suspend_serial(smx_context_t context);
+static void smx_ctx_sysv_resume_serial(smx_process_t first_process);
+static void smx_ctx_sysv_runall_serial(void);
+
+static void smx_ctx_sysv_stop_parallel(smx_context_t context);
+static void smx_ctx_sysv_suspend_parallel(smx_context_t context);
+static void smx_ctx_sysv_resume_parallel(smx_process_t first_process);
+static void smx_ctx_sysv_runall_parallel(void);
+
+/* This is a bit paranoid about SIZEOF_VOIDP not being a multiple of SIZEOF_INT,
+ * but it doesn't harm. */
+#define CTX_ADDR_LEN (SIZEOF_VOIDP / SIZEOF_INT + !!(SIZEOF_VOIDP % SIZEOF_INT))
+union u_ctx_addr {
+ void *addr;
+ int intv[CTX_ADDR_LEN];
+};
+#if (CTX_ADDR_LEN == 1)
+# define CTX_ADDR_SPLIT(u) (u).intv[0]
+#elif (CTX_ADDR_LEN == 2)
+# define CTX_ADDR_SPLIT(u) (u).intv[0], (u).intv[1]
+#else
+# error Your architecture is not supported yet
+#endif