Message handling functions


Files

file  msg.c
 Message handling functions.

Functions

RTAI_SYSCALL_MODE RT_TASKrt_send (RT_TASK *task, unsigned long msg)
  Send a message.
RTAI_SYSCALL_MODE RT_TASKrt_send_if (RT_TASK *task, unsigned long msg)
  Send a message, only if the calling task will not be blocked.
RTAI_SYSCALL_MODE RT_TASKrt_send_until (RT_TASK *task, unsigned long msg, RTIME time)
  brief Send a message with an absolute timeout.
RTAI_SYSCALL_MODE RT_TASKrt_send_timed (RT_TASK *task, unsigned long msg, RTIME delay)
  brief Send a message with a relative timeout.
RTAI_SYSCALL_MODE RT_TASKrt_evdrp (RT_TASK *task, void *msg)
  Eavedrop (spy) the content of a message.
RTAI_SYSCALL_MODE RT_TASKrt_receive (RT_TASK *task, void *msg)
  Receive a message.
RTAI_SYSCALL_MODE RT_TASKrt_receive_if (RT_TASK *task, void *msg)
  Receive a message, only if the calling task is not blocked.
RTAI_SYSCALL_MODE RT_TASKrt_receive_until (RT_TASK *task, void *msg, RTIME time)
  Receive a message with an absolute timeout.
RTAI_SYSCALL_MODE RT_TASKrt_receive_timed (RT_TASK *task, void *msg, RTIME delay)
  Receive a message with a relative timeout.
RTAI_SYSCALL_MODE RT_TASKrt_sendx (RT_TASK *task, void *msg, int size)
  Send an extended message.
RTAI_SYSCALL_MODE RT_TASKrt_sendx_if (RT_TASK *task, void *msg, int size)
  Send an extended message, only if the calling task will not be blocked.
RTAI_SYSCALL_MODE RT_TASKrt_sendx_until (RT_TASK *task, void *msg, int size, RTIME time)
  Send an extended message with absolute timeout.
RTAI_SYSCALL_MODE RT_TASKrt_sendx_timed (RT_TASK *task, void *msg, int size, RTIME delay)
  Send an extended message with relative timeout.
RTAI_SYSCALL_MODE RT_TASKrt_evdrpx (RT_TASK *task, void *msg, int size, long *len)
  Eavedrop (spy) the content of an extended message.
RTAI_SYSCALL_MODE RT_TASKrt_receivex (RT_TASK *task, void *msg, int size, long *len)
  Receive an extended message.
RTAI_SYSCALL_MODE RT_TASKrt_receivex_if (RT_TASK *task, void *msg, int size, long *len)
  Receive an extended message, only if the calling task is not blocked.
RTAI_SYSCALL_MODE RT_TASKrt_receivex_until (RT_TASK *task, void *msg, int size, long *len, RTIME time)
  Receive an extended message with an absolute timeout.
RTAI_SYSCALL_MODE RT_TASKrt_receivex_timed (RT_TASK *task, void *msg, int size, long *len, RTIME delay)
  Receive an extended message with a relative timeout.


Function Documentation

RTAI_SYSCALL_MODE RT_TASK* rt_evdrp ( RT_TASK task,
void *  msg 
)

Eavedrop (spy) the content of a message.

rt_evdrp spies the content of a message from the task specified by task while leaving it on the queue. To actually receive the message any of the rt_receive function must be used specifically. If task is equal to 0, the caller eavdrops the first message of its receive queue, if any. rt_evdrp never blocks.

Parameters:
task is a pointer to a RT_TASK structure.
msg points to any 4 bytes word buffer provided by the caller.
Returns:
a pointer to the sender task is returned upon success.
0 is returned if no message is available. A special value is returned on other failure. The errors are described below:
  • 0: the sender task was killed before sending the message;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 756 of file msg.c.

References CHECK_RECEIVER_MAGIC, RT_SCHED_RPC, RT_SCHED_SEND, and task.

RTAI_SYSCALL_MODE RT_TASK* rt_evdrpx ( RT_TASK task,
void *  msg,
int  size,
long *  len 
)

Eavedrop (spy) the content of an extended message.

rt_evdrpx spies the content of a message from the task specified by task while leaving it on the queue. To actually receive the message any of the rt_receivex function must be used specifically. If task is equal to 0, the caller eavdrops the first message of its receive queue, if any. rt_evdrpix never blocks.

Parameters:
task is a pointer to a RT_TASK structure.
msg points to the message to be eavedropped, without receive.
size size of the message to be eavedropped.
len is a pointer to an integer to be set to the actual len of the eavedropped message.
Returns:
a pointer to the sender task is returned upon success.
0 is returned if no message is available. A special value is returned on other failure. The errors are described below:
  • 0: the sender task was killed before sending the message;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 1592 of file msg.c.

References DO_RCV_MSG, rt_evdrp(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receive ( RT_TASK task,
void *  msg 
)

Receive a message.

rt_receive gets a message from the task specified by task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receive does not block but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpced messages since rpcing tasks always waits for a returned message. Moreover it inheredits the highest priority of any rpcing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_return. Otherwise the caller task is blocked waiting for any message to be sent/rpced.

Parameters:
task is a pointer to a RT_TASK structure.
msg points to any 4 bytes word buffer provided by the caller.
Returns:
a pointer to the sender task is returned upon success.
0 is returned if the caller is unblocked but no message has been received (e.g. the task task was killed before sending the message.)
A special value is returned on other failure. The errors are described below:
  • 0: the sender task was killed before sending the message;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 808 of file msg.c.

References CHECK_RECEIVER_MAGIC, cpuid, dequeue_blocked(), enqueue_blocked(), flags, msg_not_received, rt_return(), RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RECEIVE, RT_SCHED_RETURN, RT_SCHED_RPC, RT_SCHED_SEND, rt_schedule(), RTE_HIGERR, RTP_HIGERR, and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receive_if ( RT_TASK task,
void *  msg 
)

Receive a message, only if the calling task is not blocked.

rt_receive_if tries to get a message from the task specified by task. If task is equal to 0, the caller accepts messages from any task. The caller task is never blocked but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpced messages since rpcing tasks always waits for a returned message. Moreover it inheredits the highest priority of any rpcing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_return. Otherwise the caller task is blocked waiting for any message to be sent/rpced.

Parameters:
task is a pointer to the task structure.
msg points to a buffer provided by the caller.
Returns:
a pointer to the sender task is returned upon success.
A special value is returned on other failure. The errors are described below:
  • 0: there was no message to receive;
  • 0xFFFF: task does not refer to a valid task.
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 894 of file msg.c.

References CHECK_RECEIVER_MAGIC, cpuid, dequeue_blocked(), enqueue_blocked(), flags, rt_return(), RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RETURN, RT_SCHED_RPC, RT_SCHED_SEND, RTE_HIGERR, and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receive_timed ( RT_TASK task,
void *  msg,
RTIME  delay 
)

Receive a message with a relative timeout.

rt_receive_timed receives a message from the task specified by task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receive does not block but but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpced messages since rpcing tasks always waits for a returned message. Moreover it inheredits the highest priority of any rpcing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_return. Otherwise the caller task is blocked waiting for any message to be sent/rpced. In this case these functions return if: a sender sends a message and has a lower priority; any rpced message is received;

Parameters:
task is a pointer to the task structure.
msg points to a buffer provided by the caller.
delay is a timeout relative to the current time.
Returns:
On success, a pointer to the sender task is returned. On other failure, a special value is returned. The errors are described below:
  • 0: there was no message to receive.
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.
See also: rt_receive_until().

Definition at line 1086 of file msg.c.

References rt_receive_until(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receive_until ( RT_TASK task,
void *  msg,
RTIME  time 
)

Receive a message with an absolute timeout.

rt_receive_until receives a message from the task specified by task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receive does not block but but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpced messages since rpcing tasks always waits for a returned message. Moreover it inheredits the highest priority of any rpcing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_return. Otherwise the caller task is blocked waiting for any message to be sent/rpced. In this case these functions return if: a sender sends a message and has a lower priority; any rpced message is received;

Parameters:
task is a pointer to the task structure.
msg points to a buffer provided by the caller.
time is an absolute timout value.
Returns:
On success, a pointer to the sender task is returned. On other failure, a special value is returned. The errors are described below:
  • 0: there was no message to receive.
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.
See also: rt_receive_timed().

Definition at line 986 of file msg.c.

References CHECK_RECEIVER_MAGIC, cpuid, dequeue_blocked(), enqueue_blocked(), flags, msg_not_received, rt_return(), RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RECEIVE, RT_SCHED_RETURN, RT_SCHED_RPC, RT_SCHED_SEND, rt_schedule(), RTE_HIGERR, RTP_HIGERR, and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receivex ( RT_TASK task,
void *  msg,
int  size,
long *  len 
)

Receive an extended message.

rt_receivex gets an extended message msg of size size from the task specified by task task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receivex does not block but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpcxed messages since rpcxing tasks always wait for a returned message. Moreover it inheredits the highest priority of any rpcxing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_returnx. Otherwise the caller task is blocked waiting for any message to be sentx/rpcxed.

Parameters:
task is a pointer to a RT_TASK structure.
msg points to the message to be eavedropped, without receive.
size size of the message to be eavedropped.
len is a pointer to an integer to be set to the actual len of the eavedropped message.
Returns:
a pointer to the sender task is returned upon success.
0 is returned if the caller is unblocked but no message has been received (e.g. the task task was killed before sending the message.)
A special value is returned on other failure. The errors are described below:
  • 0: the sender task was killed before sending the message;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 1643 of file msg.c.

References DO_RCV_MSG, rt_receive(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receivex_if ( RT_TASK task,
void *  msg,
int  size,
long *  len 
)

Receive an extended message, only if the calling task is not blocked.

rt_receivex gets an extended message msg of size size from the task specified by task task. If task is equal to 0, the caller accepts messages from any task. The caller task is never blocked but can be preempted if the task that rt_sentx the just received message has a higher priority. The task will not block if it receives rpcxed messages since rpcxing tasks always wait for a returned message. Moreover it inheredits the highest priority of any rpcxing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_returnx. Otherwise the caller task is blocked waiting for any message to be sentx/rpcxed.

Parameters:
task is a pointer to a RT_TASK structure.
msg points to the message to be eavedropped, without receive.
size size of the message to be eavedropped.
len is a pointer to an integer to be set to the actual len of the eavedropped message.
Returns:
a pointer to the sender task is returned upon success.
0 is returned if the caller is unblocked but no message has been received (e.g. the task task was killed before sending the message.)
A special value is returned on other failure. The errors are described below:
  • 0: the sender task was killed before sending the message;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 1694 of file msg.c.

References DO_RCV_MSG, rt_receive_if(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receivex_timed ( RT_TASK task,
void *  msg,
int  size,
long *  len,
RTIME  delay 
)

Receive an extended message with a relative timeout.

rt_receivex_until gets an extended message msg of size size from the task specified by task task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receivex does not block but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpcxed messages since rpcxing tasks always wait for a returned message. Moreover it inheredits the highest priority of any rpcxing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_returnx. Otherwise the caller task is blocked waiting for any message to be sentx/rpcxed.

In this case these functions return if: a sender sendxs a message and has a lower priority; any rpcxed message is received;

Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 1808 of file msg.c.

References DO_RCV_MSG, rt_receive_timed(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_receivex_until ( RT_TASK task,
void *  msg,
int  size,
long *  len,
RTIME  time 
)

Receive an extended message with an absolute timeout.

rt_receivex_until gets an extended message msg of size size from the task specified by task task. If task is equal to 0, the caller accepts messages from any task. If there is a pending message, rt_receivex does not block but can be preempted if the task that rt_sent the just received message has a higher priority. The task will not block if it receives rpcxed messages since rpcxing tasks always wait for a returned message. Moreover it inheredits the highest priority of any rpcxing task waiting on the receive queue. The receiving task will then recover its priority as explained in rt_returnx. Otherwise the caller task is blocked waiting for any message to be sentx/rpcxed.

In this case these functions return if: a sender sendxs a message and has a lower priority; any rpcxed message is received;

Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be always safe.

Definition at line 1751 of file msg.c.

References DO_RCV_MSG, rt_receive_until(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_send ( RT_TASK task,
unsigned long  msg 
)

Send a message.

rt_send sends the message msg to the task task. If the receiver task is ready to get the message rt_send does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task.

Parameters:
task is a pointer to a task structure.
msg corresponds to the message that has to be sent.
Returns:
On success, the pointer to the task that received the message is returned.
0 is returned if the caller is unblocked but the message has not been sent, e.g. the task task was killed before receiving the message.
A special value is returned as described below in case of a failure:
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 112 of file msg.c.

References CHECK_SENDER_MAGIC, cpuid, enqueue_blocked(), flags, msg_not_sent, RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RECEIVE, RT_SCHED_SEND, rt_schedule(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_send_if ( RT_TASK task,
unsigned long  msg 
)

Send a message, only if the calling task will not be blocked.

rt_send_if sends the message msg to the task task if the latter is ready to receive, so that the caller task is never blocked, but its execution can be preempted if the receiving task is ready to receive and has a higher priority.

Parameters:
task is a pointer to a task structure.
msg corresponds to the message that has to be sent.
Returns:
the pointer to the task task that received the message is returned upon success.
0 is returned if the message has not been sent.
A special value 0xFFFF is returned upon failure.

The errors are described below:
  • 0: the task task was not ready to receive the message.
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address, 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always. (FIXME)

Definition at line 176 of file msg.c.

References CHECK_SENDER_MAGIC, cpuid, flags, RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RECEIVE, and task.

RTAI_SYSCALL_MODE RT_TASK* rt_send_timed ( RT_TASK task,
unsigned long  msg,
RTIME  delay 
)

brief Send a message with a relative timeout.

rt_send_timed sends the message msg to the task task. If the receiver task is ready to get the message, this function does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task. In this case the function returns if:

Parameters:
task is a pointer to a task structure.
msg corresponds to the message that has to be sent.
delay is the timeout relative to the current time.
Returns:
on success, the pointer to the task that received the message i.e. the message received before timeout expiration.
0 if the message has not been sent.
A special value on other failure. The errors are described below:
  • 0: operation timed out, message was not delivered;
  • 0xFFFF: task does not refer to a valid task.
See also: rt_send_until().

Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always. (FIXME)

Definition at line 327 of file msg.c.

References rt_send_until(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_send_until ( RT_TASK task,
unsigned long  msg,
RTIME  time 
)

brief Send a message with an absolute timeout.

rt_send_until sends the message msg to the task task. If the receiver task is ready to get the message, this function does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task. In this case the function returns if:

Parameters:
task is a pointer to a task structure.
msg corresponds to the message that has to be sent.
time is the absolute timeout value.
Returns:
the pointer to the task that received the message is returned on success i.e. the message received before timeout expiration.
0 is returned if the message has not been sent. A special value is returned on other failure. The errors are described below:
  • 0: operation timed out, message was not delivered;
  • 0xFFFF: task does not refer to a valid task.
See also: rt_send_timed().

Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 246 of file msg.c.

References CHECK_SENDER_MAGIC, cpuid, enqueue_blocked(), flags, msg_not_sent, RT_SCHED_DELAYED, RT_SCHED_READY, RT_SCHED_RECEIVE, RT_SCHED_SEND, rt_schedule(), and task.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_sendx ( RT_TASK task,
void *  msg,
int  size 
)

Send an extended message.

rt_sendx sends an arbitrary message msg of size size bytes to the task task. If the receiver task is ready to get the message rt_sendx does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task.

Parameters:
task is a pointer to a task structure.
msg points to the message to be sent.
size size of the message to be sent.
Returns:
On success, the pointer to the task that received the message is returned.
0 is returned if the caller is unblocked but the message has not been sent, e.g. the task task was killed before receiving the message.
A special value is returned as described below in case of a failure:
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 1349 of file msg.c.

References rt_send(), SET_SEND_MCB, task, and task_mcb.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_sendx_if ( RT_TASK task,
void *  msg,
int  size 
)

Send an extended message, only if the calling task will not be blocked.

rt_sendx_if sends an arbitrary message msg of size size bytes to the task task if the latter is ready to receive. So the caller task in never blocked but its execution can be preempted if the receiving task has a higher priority.

Parameters:
task is a pointer to a task structure.
msg points to the message to be sent.
size size of the message to be sent.
Returns:
On success, the pointer to the task that received the message is returned.
0 is returned if the caller is unblocked but the message has not been sent, e.g. the task task was killed before receiving the message.
A special value is returned as described below in case of a failure:
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 1390 of file msg.c.

References rt_send_if(), SET_SEND_MCB, task, and task_mcb.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_sendx_timed ( RT_TASK task,
void *  msg,
int  size,
RTIME  delay 
)

Send an extended message with relative timeout.

rt_sendx_until sends an arbitrary message msg of size size bytes to the task task. If the receiver task is ready to get the message rt_sendx_until does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task. In this case the function returns if:

Parameters:
task is a pointer to a task structure.
msg points to the message to be sent.
size size of the message to be sent.
delay is r timeout elative to the current time.
Returns:
On success, the pointer to the task that received the message is returned.
0 is returned if the caller is unblocked but the message has not been sent, e.g. the task task was killed before receiving the message.
A special value is returned as described below in case of a failure:
  • 0: operation timed out, message was not delivered;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 1492 of file msg.c.

References rt_send_timed(), SET_SEND_MCB, task, and task_mcb.

Here is the call graph for this function:

RTAI_SYSCALL_MODE RT_TASK* rt_sendx_until ( RT_TASK task,
void *  msg,
int  size,
RTIME  time 
)

Send an extended message with absolute timeout.

rt_sendx_until sends an arbitrary message msg of size size bytes to the task task. If the receiver task is ready to get the message rt_sendx_until does not block the sending task, but its execution can be preempted if the receiving task has a higher priority. Otherwise the caller task is blocked and queued up in priority order on the receive list of the sent task. In this case the function returns if:

Parameters:
task is a pointer to a task structure.
msg points to the message to be sent.
size size of the message to be sent.
time is an absolute timeout value.
Returns:
On success, the pointer to the task that received the message is returned.
0 is returned if the caller is unblocked but the message has not been sent, e.g. the task task was killed before receiving the message.
A special value is returned as described below in case of a failure:
  • 0: operation timed out, message was not delivered;
  • 0xFFFF: task does not refer to a valid task.
Note:
Since all the messaging functions return a task address 0xFFFF could seem an inappropriate return value. However on all the CPUs RTAI runs on 0xFFFF is not an address that can be used by any RTAI task, so it is should be safe always.

Definition at line 1441 of file msg.c.

References rt_send_until(), SET_SEND_MCB, task, and task_mcb.

Here is the call graph for this function:


Generated on Tue Feb 2 17:48:33 2010 for RTAI API by  doxygen 1.4.7