next up previous contents index
Next: 25.5.5 oskit_ipc_reply: reply to Up: 25.5 InterThread Communication Previous: 25.5.3 oskit_ipc_wait: Receive a

25.5.4 oskit_ipc_call: make a synchronous IPC call to another thread

 

SYNOPSIS

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

oskit_error_t oskit_ipc_call(pthread_t dst, void *sendmsg, oskit_size_t sendmsg_size, void *recvmsg, oskit_size_t recvmsg_size, oskit_size_t *actual, oskit_s32_t timeout);

DESCRIPTION

Make a synchronous IPC call to another thread, and wait for a reply. The destination thread is specified by its pthread_t. The sending thread is blocked until the receiving thread replies to the IPC using oskit_ipc_reply. The send buffer and the reply buffer are specified separately, with the actual number bytes contained in the reply returned in the location pointed to by actual.

PARAMETERS

dst
The pthread_t of the destination thread.
sendmsg
The message buffer to send.
sendmsg_size
The size of the send message buffer, in bytes.
recvmsg
The message receive buffer.
recvmsg_size
The size of the receive message buffer, in bytes.
actual
The location in which to place the number of bytes contained in the reply message.
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