SimGrid
3.18
Versatile Simulation of Distributed Systems
|
Fast context switching inspired from SystemV ucontexts.
The main difference to the System V context is that Raw Contexts are much faster because they don't preserve the signal mask when switching. This saves a system call (at least on Linux) on each context switch.
#include <ContextRaw.hpp>
Public Member Functions | |
RawContext (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process) | |
~RawContext () override | |
void | stop () override |
virtual void | resume ()=0 |
![]() | |
Context (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process) | |
void | operator() () |
bool | has_code () const |
smx_actor_t | process () |
void | set_cleanup (void_pfn_smxprocess_t cleanup) |
virtual | ~Context () |
virtual void | suspend ()=0 |
Static Public Member Functions | |
static void | swap (RawContext *from, RawContext *to) |
static RawContext * | getMaestro () |
static void | setMaestro (RawContext *maestro) |
Additional Inherited Members | |
![]() | |
bool | iwannadie |
simgrid::kernel::context::RawContext::RawContext | ( | std::function< void()> | code, |
void_pfn_smxprocess_t | cleanup_func, | ||
smx_actor_t | process | ||
) |
|
override |
|
overridevirtual |
Reimplemented from simgrid::kernel::context::Context.
|
pure virtual |
Implemented in simgrid::kernel::context::SerialRawContext.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |