Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove a useless function. The default one does the same thing.
[simgrid.git] / src / simix / smx_context_sysv.c
index f57d5a9..8bcc0cf 100644 (file)
@@ -85,7 +85,6 @@ void SIMIX_ctx_sysv_factory_init(smx_context_factory_t *factory)
     (*factory)->stop = smx_ctx_sysv_stop_parallel;
     (*factory)->suspend = smx_ctx_sysv_suspend_parallel;
     (*factory)->runall = smx_ctx_sysv_runall_parallel;
-    (*factory)->self = smx_ctx_sysv_self_parallel;
 #else
     THROWF(arg_error, 0, "No thread support for parallel context execution");
 #endif
@@ -125,10 +124,7 @@ smx_ctx_sysv_create_context_sized(size_t size, xbt_main_func_t code,
      otherwise it is the context for maestro */
   if (code) {
 
-    int res = getcontext(&(context->uc));
-    xbt_assert(res == 0,
-        "Error in context saving: %d (%s)", errno,
-        strerror(errno));
+    getcontext(&(context->uc));
 
     context->uc.uc_link = NULL;
 
@@ -238,7 +234,7 @@ static void smx_ctx_sysv_resume_serial(smx_process_t first_process)
 
 static void smx_ctx_sysv_runall_serial(void)
 {
-  if (xbt_dynar_length(simix_global->process_to_run) > 0) {
+  if (!xbt_dynar_is_empty(simix_global->process_to_run)) {
     smx_process_t first_process =
         xbt_dynar_get_as(simix_global->process_to_run, 0, smx_process_t);
     smx_ctx_sysv_process_index = 1;
@@ -300,10 +296,3 @@ static void smx_ctx_sysv_runall_parallel(void)
       simix_global->process_to_run);
 #endif
 }
-
-smx_context_t smx_ctx_sysv_self_parallel(void)
-{
-  /*smx_context_t self_context = (smx_context_t) xbt_os_thread_get_extra_data();
-  return self_context ? self_context : (smx_context_t) maestro_context;*/
-  return SIMIX_context_get_current();
-}