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

25.5.3 oskit_ipc_wait: Receive a message from any thread

 

SYNOPSIS

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

oskit_error_t oskit_ipc_wait(pthread_t *src, void *msg, oskit_size_t msg_size, oskit_size_t *actual, oskit_s32_t timeout);

DESCRIPTION

This function operates identically to oskit_ipc_recv, except that the sending thread does not need to be a specific thread. The first thread that attempts to send to the current thread will succeed. The pthread_t of that thread is returned to the caller in src.

PARAMETERS

src
The location in which to place the pthread_t of the sending thread.
msg
The message buffer.
msg_size
The size of the message buffer, in bytes.
actual
The location in which to place the number of bytes received.
timeout
A timeout value. Currently only zero and non-zero values are legal. zero means no wait, non-zero means wait forever.

RETURNS

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



Utah Flux Research Group