RT_TBX_BROADCAST_TIMED(8)

NAME
rt_tbx_broadcast_until, rt_tbx_broadcast_timed - send message unconditionally to all the tasks waiting on the same tbx with timeout control

SYNOPSIS
#include <rtai_sched.h>

int rt_tbx_broadcast_until(TBX *tbx, void *msg, int msg_size, RTIME time);
int rt_tbx_broadcast_timed(TBX *tbx, void *msg, int msg_size, RTIME delay);

DESCRIPTION
rt_tbx_broadcast_until and rt_tbx_broadcast_timed send a message msg of msg_size bytes to the typed mailbox tbx. The caller will be blocked until the whole message is sent to all the tasks waiting on tbx. the timeout expires or an error occurs. Also the receiving tasks are kept blocked until all of them have received the message, then they are awakened in FIFO or priority order depending on the flags given when calling rt_tbx_init(8) The caller is no blocked if there are no waiting tasks to awake. time is an absolute value. delay is relative to the current time.

RETURN VALUES
The number of awakened tasks is returned in case of message regularly sent, otherwise 0 is returned. On failure a negative value is returned as described below.

ERRORS
-EINVAL tbx points to an invalid typed mailbox. -EMSGSIZE msg_size is bigger than the size of the entire mailbox.

DESCRIPTION
rt_tbx_broadcast sends a message msg of msg_size bytes to the typed mailbox tbx. The caller will send the message if (a)there is enough free room in the tbx. immediately and (b)there are tasks waiting on tbx. These tasks are kept blocked until all of them have received the message, then they are awakened in FIFO or priority order depending on the flags given when calling rt_tbx_init(8)

RETURN VALUES
The number of awakened tasks is returned in case of message regularly sent, otherwise 0 is returned. On failure a negative value is returned as described below.

ERRORS
-EINVAL tbx points to an invalid typed mailbox. -EMSGSIZE msg_size is bigger than the size of the entire mailbox.