RT_TBX_RECEIVE_UNTIL(8)

NAME
rt_tbx_receive_until, rt_tbx_receive_timed - receive a message with timeout

SYNOPSIS
#include <rtai_sched.h>

int rt_tbx_receive_until(TBX *tbx, void *msg, int msg_size, RTIME time); int rt_tbx_receive_timed(TBX *tbx, void *msg, int msg_size, RTIME delay);

DESCRIPTION
rt_tbx_receive_until and rt_tbx_receive_timed receive a message of msg_size bytes from the typed mailbox tbx. The caller will be blocked until all bytes of the message arrive, timeout expires or an error occurs. time is an absolute value. delay is relative to the current time. msg points to a buffer provided by the caller.

RETURN VALUES
0 is returned in case of message regularly received, otherwise msg_size is returned in case of timeout. 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.