// ***** Class definitions
namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace context {
class RawContext;
class RawContextFactory;
return new RawContextFactory();
}
-}
-}
+}}} // namespace
// ***** Loads of static stuff
#if HAVE_THREAD_CONTEXTS
static xbt_parmap_t raw_parmap;
-static simgrid::simix::RawContext** raw_workers_context; /* space to save the worker context in each thread */
+static simgrid::kernel::context::RawContext** raw_workers_context; /* space to save the worker context in each thread */
static uintptr_t raw_threads_working; /* number of threads that have started their work */
static xbt_os_thread_key_t raw_worker_id_key; /* thread-specific storage for the thread id */
#endif
static unsigned long raw_process_index = 0; /* index of the next process to run in the
* list of runnable processes */
-static simgrid::simix::RawContext* raw_maestro_context;
+static simgrid::kernel::context::RawContext* raw_maestro_context;
static bool raw_context_parallel = false;
// ***** Method definitions
namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace context {
RawContextFactory::RawContextFactory()
: ContextFactory("RawContextFactory")
void RawContextFactory::run_all_serial()
{
+ if (xbt_dynar_is_empty(simix_global->process_to_run))
+ return;
+
smx_process_t first_process =
xbt_dynar_get_as(simix_global->process_to_run, 0, smx_process_t);
raw_process_index = 1;
}
}
-}
-}
+}}}