Messages to be delivered to dedos_threads. More...
#include "runtime_communication.h"
#include "inter_runtime_messages.h"
#include "rt_controller_messages.h"
Go to the source code of this file.
Classes | |
struct | thread_msg |
A message to be delivered to a dedos_thread. More... | |
struct | send_to_peer_msg |
For delivery to the output monitor thread, a message to be sent to a peer runtime. More... | |
struct | send_to_ctrl_msg |
For delivery to output monitor thread, a message to be sent to the controller. More... | |
Enumerations | |
enum | thread_msg_type { UNKNOWN_THREAD_MSG = 0, CONNECT_TO_RUNTIME = 13, SEND_TO_PEER = 1000, SEND_TO_CTRL = 1001, CREATE_MSU = 2001, DELETE_MSU = 2002, MSU_ROUTE = 3001 } |
All messages that can be received by output thread or workers. More... | |
Functions | |
struct thread_msg * | init_send_thread_msg (unsigned int runtime_id, unsigned int target_id, size_t data_len, void *data) |
Initializes a send_to_peer message (SEND_TO_PEER) More... | |
void | destroy_thread_msg (struct thread_msg *msg) |
Frees a thread message. More... | |
struct thread_msg * | construct_thread_msg (enum thread_msg_type type, ssize_t data_size, void *data) |
Allocates and initializes a thread message with the provided options. More... | |
int | enqueue_thread_msg (struct thread_msg *msg, struct msg_queue *queue) |
Enqueues a dedos_msg with a thread_msg as the payload to the appropriate queue. More... | |
struct thread_msg * | dequeue_thread_msg (struct msg_queue *queue) |
Dequeues a thread_msg from the message queue. More... | |
Messages to be delivered to dedos_threads.
Definition in file thread_message.h.
enum thread_msg_type |
All messages that can be received by output thread or workers.
Enumerator | |
---|---|
UNKNOWN_THREAD_MSG |
Kept unknown at 0 to catch mis-labeled messages. |
CONNECT_TO_RUNTIME |
payload: ctrl_add_runtime_msg (ctrl_runtime_messages.h) |
SEND_TO_PEER |
payload: send_to_runtime_msg (below) |
SEND_TO_CTRL |
payload: send_to_ctrl_msg (below) |
CREATE_MSU | |
DELETE_MSU | |
MSU_ROUTE |
Definition at line 35 of file thread_message.h.
struct thread_msg* construct_thread_msg | ( | enum thread_msg_type | type, |
ssize_t | data_size, | ||
void * | data | ||
) |
Allocates and initializes a thread message with the provided options.
Definition at line 66 of file thread_message.c.
struct thread_msg* dequeue_thread_msg | ( | struct msg_queue * | queue | ) |
Dequeues a thread_msg from the message queue.
Definition at line 48 of file thread_message.c.
void destroy_thread_msg | ( | struct thread_msg * | msg | ) |
Frees a thread message.
Definition at line 81 of file thread_message.c.
int enqueue_thread_msg | ( | struct thread_msg * | msg, |
struct msg_queue * | queue | ||
) |
Enqueues a dedos_msg with a thread_msg as the payload to the appropriate queue.
Definition at line 29 of file thread_message.c.
struct thread_msg* init_send_thread_msg | ( | unsigned int | runtime_id, |
unsigned int | target_id, | ||
size_t | data_len, | ||
void * | data | ||
) |
Initializes a send_to_peer message (SEND_TO_PEER)
runtime_id | The runtime to deliver the message to |
target_id | The remote target (either thread ID or MSU ID) |
data_len | size of provided data |
Definition at line 87 of file thread_message.c.