#include <oskit/threads/pthread.h>
#include <oskit/threads/ipc.h>oskit_error_t oskit_ipc_recv(pthread_t src, void *msg, oskit_size_t msg_size, oskit_size_t *actual, oskit_s32_t timeout);
Receive a message from another thread. The sending thread is specified by its pthread_t. If the specified sending thread has not attempted to send a message to current thread, the thread is blocked until such time as the sender initiates a send operation to the current thread. However, if the sender is blocked trying to send a message to the current thread, the message is immediately received and the sender is woken up.The timeout value is either zero or non-zero. A zero value means do not wait, but simply check to see if a message from the sender is pending. A non-zero value means wait forever.
- src
- 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 0 on success, or an error code specified in <oskit/error.h>, on error.