Declares the structures and functions applicable to MSUs on the local machine. More...
Go to the source code of this file.
Classes | |
struct | local_msu |
The structure that represents an MSU located on the local machine. More... | |
Functions | |
struct local_msu * | init_msu (unsigned int id, struct msu_type *type, struct worker_thread *thread, struct msu_init_data *data) |
Allocates and creates a new MSU of the specified type and ID on the given thread. More... | |
int | try_destroy_msu (struct local_msu *msu) |
Destroys the MSU, but only if it has no states currently saved. More... | |
void | destroy_msu (struct local_msu *msu) |
Calls type-specific destroy function and frees associated memory. More... | |
int | msu_dequeue (struct local_msu *msu) |
Dequeus a message from a local MSU and calls its receive function. More... | |
struct local_msu * | get_local_msu (unsigned int id) |
Gets the local MSU with the given ID, or NULL if N/A. More... | |
int | msu_error (struct local_msu *msu, struct msu_msg_hdr *hdr, int broadcast) |
Declares the structures and functions applicable to MSUs on the local machine.
Definition in file local_msu.h.
void destroy_msu | ( | struct local_msu * | msu | ) |
Calls type-specific destroy function and frees associated memory.
Definition at line 257 of file local_msu.c.
struct local_msu* get_local_msu | ( | unsigned int | id | ) |
Gets the local MSU with the given ID, or NULL if N/A.
id | ID of the MSU to retrieve |
Definition at line 134 of file local_msu.c.
struct local_msu* init_msu | ( | unsigned int | id, |
struct msu_type * | type, | ||
struct worker_thread * | thread, | ||
struct msu_init_data * | data | ||
) |
Allocates and creates a new MSU of the specified type and ID on the given thread.
id | ID of the MSU to be created |
type | MSU type of the MSU to be created |
thread | The thread on which this MSU is to be created |
data | Any initial data that is passed to the MSU's specific init function |
Definition at line 198 of file local_msu.c.
int msu_dequeue | ( | struct local_msu * | msu | ) |
Dequeus a message from a local MSU and calls its receive function.
msu | MSU to dequeue the message from |
Definition at line 323 of file local_msu.c.
int msu_error | ( | struct local_msu * | msu, |
struct msu_msg_hdr * | hdr, | ||
int | broadcast | ||
) |
Definition at line 353 of file local_msu.c.
int try_destroy_msu | ( | struct local_msu * | msu | ) |
Destroys the MSU, but only if it has no states currently saved.
Definition at line 249 of file local_msu.c.