SimGrid  3.18
Versatile Simulation of Distributed Systems
ActorImpl.hpp File Reference
#include "simgrid/s4u/Actor.hpp"
#include "src/simix/popping_private.hpp"
#include "src/surf/PropertyHolder.hpp"
#include <boost/intrusive/list.hpp>
#include <list>
#include <map>

Classes

struct  s_smx_process_exit_fun_t
 
class  simgrid::simix::ProcessArg
 
class  simgrid::simix::ActorImpl
 

Namespaces

 simgrid
 Alltoall Bruck.
 
 simgrid::simix
 

Typedefs

typedef simgrid::simix::ProcessArgsmx_process_arg_t
 
typedef simgrid::simix::ActorImplsmx_actor_t
 

Functions

smx_actor_t SIMIX_process_create (const char *name, std::function< void()> code, void *data, sg_host_t host, std::map< std::string, std::string > *properties, smx_actor_t parent_process)
 
void SIMIX_process_runall ()
 Executes the processes from simix_global->process_to_run. More...
 
void SIMIX_process_kill (smx_actor_t process, smx_actor_t issuer)
 Internal function to kill a SIMIX process. More...
 
void SIMIX_process_killall (smx_actor_t issuer, int reset_pid)
 Kills all running processes. More...
 
void SIMIX_process_cleanup (smx_actor_t arg)
 Moves a process to the list of processes to destroy. More...
 
void SIMIX_process_empty_trash ()
 Garbage collection. More...
 
void SIMIX_process_yield (smx_actor_t self)
 Calling this function makes the process to yield. More...
 
void SIMIX_process_exception_terminate (xbt_ex_t *e)
 
void SIMIX_process_change_host (smx_actor_t process, sg_host_t dest)
 
void SIMIX_process_set_data (smx_actor_t process, void *data)
 
smx_actor_t SIMIX_process_get_by_name (const char *name)
 
void SIMIX_process_auto_restart_set (smx_actor_t process, int auto_restart)
 Sets the auto-restart status of the process. More...
 
void SIMIX_process_sleep_destroy (smx_activity_t synchro)
 
smx_activity_t SIMIX_process_join (smx_actor_t issuer, smx_actor_t process, double timeout)
 

Variables

void(* SMPI_switch_data_segment )(int dest)
 

Typedef Documentation

◆ smx_process_arg_t

◆ smx_actor_t

Function Documentation

◆ SIMIX_process_create()

smx_actor_t SIMIX_process_create ( const char *  name,
std::function< void()>  code,
void data,
sg_host_t  host,
std::map< std::string, std::string > *  properties,
smx_actor_t  parent_process 
)

◆ SIMIX_process_runall()

void SIMIX_process_runall ( )

Executes the processes from simix_global->process_to_run.

The processes of simix_global->process_to_run are run (in parallel if possible). On exit, simix_global->process_to_run is empty, and simix_global->process_that_ran contains the list of processes that just ran. The two lists are swapped so, be careful when using them before and after a call to this function.

◆ SIMIX_process_kill()

void SIMIX_process_kill ( smx_actor_t  process,
smx_actor_t  issuer 
)

Internal function to kill a SIMIX process.

This function may be called when a SIMCALL_PROCESS_KILL simcall occurs, or directly for SIMIX internal purposes.

Parameters
processpoor victim
issuerthe process which has sent the PROCESS_KILL. Important to not schedule twice the same process.

◆ SIMIX_process_killall()

void SIMIX_process_killall ( smx_actor_t  issuer,
int  reset_pid 
)

Kills all running processes.

Parameters
issuerthis one will not be killed

◆ SIMIX_process_cleanup()

void SIMIX_process_cleanup ( smx_actor_t  arg)

Moves a process to the list of processes to destroy.

◆ SIMIX_process_empty_trash()

void SIMIX_process_empty_trash ( )

Garbage collection.

Should be called some time to time to free the memory allocated for processes that have finished (or killed).

◆ SIMIX_process_yield()

void SIMIX_process_yield ( smx_actor_t  self)

Calling this function makes the process to yield.

Only the current process can call this function, giving back the control to maestro.

Parameters
selfthe current process

◆ SIMIX_process_exception_terminate()

void SIMIX_process_exception_terminate ( xbt_ex_t e)

◆ SIMIX_process_change_host()

void SIMIX_process_change_host ( smx_actor_t  process,
sg_host_t  dest 
)

◆ SIMIX_process_set_data()

void SIMIX_process_set_data ( smx_actor_t  process,
void data 
)

◆ SIMIX_process_get_by_name()

smx_actor_t SIMIX_process_get_by_name ( const char *  name)

◆ SIMIX_process_auto_restart_set()

void SIMIX_process_auto_restart_set ( smx_actor_t  process,
int  auto_restart 
)

Sets the auto-restart status of the process.

If set to 1, the process will be automatically restarted when its host comes back.

◆ SIMIX_process_sleep_destroy()

void SIMIX_process_sleep_destroy ( smx_activity_t  synchro)

◆ SIMIX_process_join()

smx_activity_t SIMIX_process_join ( smx_actor_t  issuer,
smx_actor_t  process,
double  timeout 
)

Variable Documentation

◆ SMPI_switch_data_segment

void(* SMPI_switch_data_segment) (int dest)