next up previous contents index
Next: 25.5.2 oskit_ipc_recv: Receive a Up: 25.5 InterThread Communication Previous: 25.5 InterThread Communication

25.5.1 oskit_ipc_send: Send a message to another thread

 

SYNOPSIS

#include <oskit/threads/pthread.h>
#include <oskit/threads/ipc.h>

oskit_error_t oskit_ipc_send(pthread_t dst, void *msg, oskit_size_t msg_size, oskit_s32_t timeout);

DESCRIPTION

Send a message to another thread. The destination thread is specified by its pthread_t. The sending thread blocks until the receiving thread notices the message and actually initiates a receive operation for it. Control returns to the caller only when the receiver has initiated the receive.

The timeout value is currently ignored.

PARAMETERS

dst
The pthread_t of the destination thread.
msg
The message buffer.
msg_size
The size of the message, in bytes.
timeout
A timeout value. Currently ignored.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



Utah Flux Research Group