SimGrid  3.14.159
Versatile Simulation of Distributed Systems
msg_gos.cpp File Reference
#include <xbt/ex.hpp>
#include "src/msg/msg_private.h"
#include "src/simix/smx_private.h"

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (msg_gos, msg, "Logging specific to MSG (gos)")
 
msg_error_t MSG_task_execute (msg_task_t task)
 Executes a task and waits for its termination. More...
 
msg_error_t MSG_parallel_task_execute (msg_task_t task)
 Executes a parallel task and waits for its termination. More...
 
msg_error_t MSG_parallel_task_execute_with_timeout (msg_task_t task, double timeout)
 
msg_error_t MSG_process_sleep (double nb_sec)
 Sleep for the specified number of seconds. More...
 
msg_error_t MSG_task_receive (msg_task_t *task, const char *alias)
 Receives a task from a mailbox. More...
 
msg_error_t MSG_task_receive_bounded (msg_task_t *task, const char *alias, double rate)
 Receives a task from a mailbox at a given rate. More...
 
msg_error_t MSG_task_receive_with_timeout (msg_task_t *task, const char *alias, double timeout)
 Receives a task from a mailbox with a given timeout. More...
 
msg_error_t MSG_task_receive_with_timeout_bounded (msg_task_t *task, const char *alias, double timeout, double rate)
 Receives a task from a mailbox with a given timeout and at a given rate. More...
 
msg_error_t MSG_task_receive_ext (msg_task_t *task, const char *alias, double timeout, msg_host_t host)
 Receives a task from a mailbox from a specific host with a given timeout. More...
 
msg_error_t MSG_task_receive_ext_bounded (msg_task_t *task, const char *alias, double timeout, msg_host_t host, double rate)
 Receives a task from a mailbox from a specific host with a given timeout and at a given rate. More...
 
static msg_comm_t MSG_task_isend_internal (msg_task_t task, const char *alias, int(*match_fun)(void *, void *, smx_activity_t), void *match_data, void_f_pvoid_t cleanup, int detached)
 
msg_comm_t MSG_task_isend (msg_task_t task, const char *alias)
 Sends a task on a mailbox. More...
 
msg_comm_t MSG_task_isend_bounded (msg_task_t task, const char *alias, double maxrate)
 Sends a task on a mailbox with a maximum rate. More...
 
msg_comm_t MSG_task_isend_with_matching (msg_task_t task, const char *alias, int(*match_fun)(void *, void *, smx_activity_t), void *match_data)
 Sends a task on a mailbox, with support for matching requests. More...
 
void MSG_task_dsend (msg_task_t task, const char *alias, void_f_pvoid_t cleanup)
 Sends a task on a mailbox. More...
 
void MSG_task_dsend_bounded (msg_task_t task, const char *alias, void_f_pvoid_t cleanup, double maxrate)
 Sends a task on a mailbox with a maximal rate. More...
 
msg_comm_t MSG_task_irecv (msg_task_t *task, const char *name)
 Starts listening for receiving a task from an asynchronous communication. More...
 
msg_comm_t MSG_task_irecv_bounded (msg_task_t *task, const char *name, double rate)
 Starts listening for receiving a task from an asynchronous communication at a given rate. More...
 
int MSG_comm_test (msg_comm_t comm)
 Checks whether a communication is done, and if yes, finalizes it. More...
 
int MSG_comm_testany (xbt_dynar_t comms)
 This function checks if a communication is finished. More...
 
void MSG_comm_destroy (msg_comm_t comm)
 Destroys a communication. More...
 
msg_error_t MSG_comm_wait (msg_comm_t comm, double timeout)
 Wait for the completion of a communication. More...
 
void MSG_comm_waitall (msg_comm_t *comm, int nb_elem, double timeout)
 This function is called by a sender and permit to wait for each communication. More...
 
int MSG_comm_waitany (xbt_dynar_t comms)
 This function waits for the first communication finished in a list. More...
 
msg_error_t MSG_comm_get_status (msg_comm_t comm)
 Returns the error (if any) that occurred during a finished communication. More...
 
msg_task_t MSG_comm_get_task (msg_comm_t comm)
 Get a task (msg_task_t) from a communication. More...
 
void MSG_comm_copy_data_from_SIMIX (smx_activity_t synchro, void *buff, size_t buff_size)
 This function is called by SIMIX in kernel mode to copy the data of a comm. More...
 
msg_error_t MSG_task_send (msg_task_t task, const char *alias)
 Sends a task to a mailbox. More...
 
msg_error_t MSG_task_send_bounded (msg_task_t task, const char *alias, double maxrate)
 Sends a task to a mailbox with a maximum rate. More...
 
msg_error_t MSG_task_send_with_timeout (msg_task_t task, const char *alias, double timeout)
 Sends a task to a mailbox with a timeout. More...
 
msg_error_t MSG_task_send_with_timeout_bounded (msg_task_t task, const char *alias, double timeout, double maxrate)
 Sends a task to a mailbox with a timeout and with a maximum rate. More...
 
int MSG_task_listen (const char *alias)
 Check if there is a communication going on in a mailbox. More...
 
int MSG_task_listen_from (const char *alias)
 Look if there is a communication on a mailbox and return the PID of the sender process. More...
 
void MSG_task_set_category (msg_task_t task, const char *category)
 Sets the tracing category of a task. More...
 
const char * MSG_task_get_category (msg_task_t task)
 Gets the current tracing category of a task. More...
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( msg_gos  ,
msg  ,
"Logging specific to MSG (gos)"   
)

◆ MSG_parallel_task_execute_with_timeout()

msg_error_t MSG_parallel_task_execute_with_timeout ( msg_task_t  task,
double  timeout 
)

◆ MSG_task_isend_internal()

static msg_comm_t MSG_task_isend_internal ( msg_task_t  task,
const char *  alias,
int(*)(void *, void *, smx_activity_t match_fun,
void match_data,
void_f_pvoid_t  cleanup,
int  detached 
)
inlinestatic

◆ MSG_comm_copy_data_from_SIMIX()

void MSG_comm_copy_data_from_SIMIX ( smx_activity_t  synchro,
void buff,
size_t  buff_size 
)

This function is called by SIMIX in kernel mode to copy the data of a comm.

Parameters
synchrothe comm
buffthe data copied
buff_sizesize of the buffer