The publicly accessible copy of the routing table.
struct local_msu * get_local_msu(unsigned int id)
Gets the local MSU with the given ID, or NULL if N/A.
Header for messages passed to MSUs.
Defines a type of MSU, including callback and accessor functions.
Representation of a thread that holds MSUs, messages, and waits on a semaphore.
unsigned int scheduling_weight
The number of items that should be dequeued on this MSU each tick.
void * msu_state
State related to the entire instance of the MSU, not just individual items.
Container for linked list message queue.
int msu_error(struct local_msu *msu, struct msu_msg_hdr *hdr, int broadcast)
unsigned int id
Unique ID for a local MSU.
int try_destroy_msu(struct local_msu *msu)
Destroys the MSU, but only if it has no states currently saved.
struct msu_state * item_state
Keyed state structure, accessible through queue item IDs.
struct route_set routes
Routing table set, containing all destination MSUs (see routing.h for details)
The structure that represents an MSU located on the local machine.
Data with which an MSU is initialized, and the payload for messages of type CTRL_CREATE_MSU.
Structures and functions for enqueueing and dequeuing general-purpose messages from a queue...
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. ...
struct msg_queue queue
Input queue to MSU.
void destroy_msu(struct local_msu *msu)
Calls type-specific destroy function and frees associated memory.
struct worker_thread * thread
The worker thread on which this MSU is placed.
The structure contining msu state.
Used to uniquely identify the source of a message, used in state storage as well as routing...
int msu_dequeue(struct local_msu *msu)
Dequeus a message from a local MSU and calls its receive function.
struct msu_type * type
Pointer to struct containing information shared across all instances of this type of MSU...