SimGrid  3.14.159
Versatile Simulation of Distributed Systems
Context.hpp File Reference
#include <functional>
#include <memory>
#include <unordered_map>
#include <vector>
#include <xbt/functional.hpp>
#include "src/internal_config.h"
#include "simgrid/simix.h"
#include "surf/surf.h"
#include "xbt/base.h"
#include "xbt/fifo.h"
#include "xbt/swag.h"
#include "xbt/dict.h"
#include "xbt/mallocator.h"
#include "xbt/config.h"
#include "xbt/xbt_os_time.h"
#include "xbt/function_types.h"
#include "src/xbt/ex_interface.h"
#include "src/instr/instr_private.h"
#include "src/simix/smx_host_private.h"
#include "src/simix/smx_io_private.h"
#include "src/simix/smx_network_private.h"
#include "src/simix/popping_private.h"
#include "src/simix/smx_synchro_private.h"
#include <signal.h>
#include "src/simix/ActorImpl.hpp"
#include <simgrid/simix.hpp>

Classes

class  simgrid::kernel::context::ContextFactory
 
class  simgrid::kernel::context::Context
 
class  simgrid::kernel::context::AttachContext
 

Namespaces

 simgrid
 Host datatype from SIMIX POV.
 
 simgrid::kernel
 
 simgrid::kernel::context
 

Macros

#define smx_context_usable_stack_size   smx_context_stack_size
 

Typedefs

typedef ContextFactory *(* simgrid::kernel::context::ContextFactoryInitializer) ()
 
typedef simgrid::kernel::context::ContextFactorysmx_context_factory_t
 

Functions

ContextFactory * simgrid::kernel::context::thread_factory ()
 
ContextFactory * simgrid::kernel::context::sysv_factory ()
 
ContextFactory * simgrid::kernel::context::raw_factory ()
 
ContextFactory * simgrid::kernel::context::boost_factory ()
 
void SIMIX_context_mod_init ()
 This function is called by SIMIX_global_init() to initialize the context module. More...
 
void SIMIX_context_mod_exit ()
 This function is called by SIMIX_clean() to finalize the context module. More...
 
smx_context_t SIMIX_context_new (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t simix_process)
 creates a new context for a user level process More...
 
void SIMIX_context_runall ()
 Executes all the processes to run (in parallel if possible). More...
 
smx_context_t SIMIX_context_self ()
 returns the current running context More...
 
voidSIMIX_context_stack_new ()
 
void SIMIX_context_stack_delete (void *stack)
 
void SIMIX_context_set_current (smx_context_t context)
 Sets the current context of this thread. More...
 
smx_context_t SIMIX_context_get_current ()
 Returns the current context of this thread. More...
 
int SIMIX_process_get_maxpid ()
 
void SIMIX_post_create_environment ()
 
simgrid::simix::ActorCodeFactorySIMIX_get_actor_code_factory (const char *name)
 Gets a smx_actor_t code from the global table. More...
 

Variables

char sigsegv_stack [SIGSTKSZ]
 

Macro Definition Documentation

◆ smx_context_usable_stack_size

#define smx_context_usable_stack_size   smx_context_stack_size

Typedef Documentation

◆ smx_context_factory_t

Function Documentation

◆ SIMIX_context_mod_init()

void SIMIX_context_mod_init ( )

This function is called by SIMIX_global_init() to initialize the context module.

◆ SIMIX_context_mod_exit()

void SIMIX_context_mod_exit ( )

This function is called by SIMIX_clean() to finalize the context module.

◆ SIMIX_context_new()

smx_context_t SIMIX_context_new ( std::function< void()>  code,
void_pfn_smxprocess_t  cleanup_func,
smx_actor_t  simix_process 
)

creates a new context for a user level process

Parameters
codea main function
cleanup_functhe function to call when the context stops

◆ SIMIX_context_runall()

void SIMIX_context_runall ( )

Executes all the processes to run (in parallel if possible).

◆ SIMIX_context_self()

smx_context_t SIMIX_context_self ( )

returns the current running context

◆ SIMIX_context_stack_new()

void* SIMIX_context_stack_new ( )

◆ SIMIX_context_stack_delete()

void SIMIX_context_stack_delete ( void stack)

◆ SIMIX_context_set_current()

void SIMIX_context_set_current ( smx_context_t  context)

Sets the current context of this thread.

Parameters
contextthe context to set

◆ SIMIX_context_get_current()

smx_context_t SIMIX_context_get_current ( )

Returns the current context of this thread.

Returns
the current context of this thread

◆ SIMIX_process_get_maxpid()

int SIMIX_process_get_maxpid ( )

◆ SIMIX_post_create_environment()

void SIMIX_post_create_environment ( )

◆ SIMIX_get_actor_code_factory()

simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory ( const char *  name)

Gets a smx_actor_t code from the global table.

Gets a code function from the global table. Returns nullptr if there are no function registered with the name. This table is then used by SIMIX_launch_application.

Parameters
namethe reference name of the function.
Returns
The smx_actor_t or nullptr.

Variable Documentation

◆ sigsegv_stack

char sigsegv_stack[SIGSTKSZ]