int rt_mbx_init (MBX* mbx, int size);
Using mailboxes is a flexible method of task-to-task communication. Tasks are allowed to send arbitrary size messages by using any mailbox buffer size. Clearly you should use a buffer sized at least as the largest message you envisage. However if you expect a message larger than the average message size very rarely you can use a smaller buffer without much loss of efficiency. In such a way you can set up your own mailbox usage protocol, e.g. using fix size messages with a buffer that is an integer multiple of such a size guarantees that each message is sent/received atomically to/from the mailbox. Multiple senders and receivers are allowed and each will get the service it requires in turn, according to its priority.
int rt_mbx_delete (MBX* mbx);
int rt_mbx_send (MBX* mbx, void* msg, int msg_size);
int rt_mbx_send_wp (MBX* mbx, void* msg, int msg_size);
int rt_mbx_send_if (MBX* mbx, void* msg, int msg_size);
int rt_mbx_send_until (MBX* mbx, void* msg, int msg_size, RTIME time);
int rt_mbx_send_timed (MBX* mbx, void* msg, int msg_size, RTIME delay);
int rt_mbx_receive (MBX* mbx, void* msg, int msg_size);
int rt_mbx_receive_wp (MBX* mbx, void* msg, int msg_size);
int rt_mbx_receive_if (MBX* mbx, void* msg, int msg_size);
int rt_mbx_receive_until (MBX* mbx, void* msg, int msg_size, RTIME time);
int rt_mbx_receive_timed (MBX* mbx, void* msg, int msg_size, RTIME delay);