SimGrid  3.20
Versatile Simulation of Distributed Systems
msg_process.cpp File Reference

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (msg_process, msg, "Logging specific to MSG (process)")
 
std::string instr_pid (msg_process_t proc)
 
void MSG_process_cleanup_from_SIMIX (smx_actor_t smx_actor)
 Cleans the MSG data of an actor. More...
 
smx_actor_t MSG_process_create_from_SIMIX (const char *name, std::function< void()> code, void *data, sg_host_t host, std::unordered_map< std::string, std::string > *properties, smx_actor_t)
 
msg_process_t MSG_process_create (const char *name, xbt_main_func_t code, void *data, msg_host_t host)
 Creates and runs a new msg_process_t. More...
 
msg_process_t MSG_process_create_with_arguments (const char *name, xbt_main_func_t code, void *data, msg_host_t host, int argc, char **argv)
 Creates and runs a new msg_process_t. More...
 
msg_process_t MSG_process_create_with_environment (const char *name, xbt_main_func_t code, void *data, msg_host_t host, int argc, char **argv, xbt_dict_t properties)
 Creates and runs a new msg_process_t. More...
 
msg_process_t MSG_process_create_from_stdfunc (const char *name, std::function< void()> code, void *data, msg_host_t host, std::unordered_map< std::string, std::string > *properties)
 
msg_process_t MSG_process_attach (const char *name, void *data, msg_host_t host, xbt_dict_t properties)
 
void MSG_process_detach ()
 Detach a process attached with MSG_process_attach() More...
 
voidMSG_process_get_data (msg_process_t process)
 Returns the user data of a process. More...
 
msg_error_t MSG_process_set_data (msg_process_t process, void *data)
 Sets the user data of a process. More...
 
void MSG_process_set_data_cleanup (void_f_pvoid_t data_cleanup)
 Sets a cleanup function to be called to free the userdata of a process when a process is destroyed. More...
 
xbt_dynar_t MSG_processes_as_dynar ()
 returns a list of all currently existing processes More...
 
int MSG_process_get_number ()
 Return the current number MSG processes. More...
 
int MSG_process_self_PID ()
 Return the PID of the current process. More...
 
int MSG_process_self_PPID ()
 Return the PPID of the current process. More...
 
const char * MSG_process_self_name ()
 Return the name of the current process. More...
 
msg_process_t MSG_process_self ()
 Return the current process. More...
 
smx_context_t MSG_process_get_smx_ctx (msg_process_t process)
 
void MSG_process_on_exit (int_f_pvoid_pvoid_t fun, void *data)
 Add a function to the list of "on_exit" functions for the current process. More...
 
void MSG_process_ref (msg_process_t process)
 Take an extra reference on that process to prevent it to be garbage-collected. More...
 
void MSG_process_unref (msg_process_t process)
 Release a reference on that process so that it can get be garbage-collected. More...
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( msg_process  ,
msg  ,
"Logging specific to MSG (process)"   
)

◆ instr_pid()

std::string instr_pid ( msg_process_t  proc)

◆ MSG_process_cleanup_from_SIMIX()

void MSG_process_cleanup_from_SIMIX ( smx_actor_t  smx_actor)

Cleans the MSG data of an actor.

Parameters
smx_actora SIMIX actor

◆ MSG_process_create_from_SIMIX()

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

◆ MSG_process_create_from_stdfunc()

msg_process_t MSG_process_create_from_stdfunc ( const char *  name,
std::function< void()>  code,
void data,
msg_host_t  host,
std::unordered_map< std::string, std::string > *  properties 
)

◆ MSG_process_attach()

msg_process_t MSG_process_attach ( const char *  name,
void data,
msg_host_t  host,
xbt_dict_t  properties 
)

◆ MSG_process_detach()

void MSG_process_detach ( )

Detach a process attached with MSG_process_attach()

This is called when the current process has finished its job. Used in the main thread, it waits for the simulation to finish before returning. When it returns, the other simulated processes and the maestro are destroyed.

◆ MSG_processes_as_dynar()

xbt_dynar_t MSG_processes_as_dynar ( )

returns a list of all currently existing processes

◆ MSG_process_get_number()

int MSG_process_get_number ( )

Return the current number MSG processes.

◆ MSG_process_get_smx_ctx()

smx_context_t MSG_process_get_smx_ctx ( msg_process_t  process)