SrrReceive

SrrReceive — receives a message.

Syntax

#include <srripc.h>
pid_t SrrReceive(pid_t  pid,
 void*  msg,
 size_t*  size);

Arguments

pid

The process to receive a message from; 0 means from any process.

msg

The buffer for the received message.

size

On call, the size of the buffer for the received message; on return, the size of the message in the buffer.

Returns

On success, the process ID of the sender, or -1 on failure.

Description

This function performs a synchronous Receive. Once a message has been received the sending task is blocked until the recipient issues a reply message using the SrrReply function. Unlike the QNX version of this function (Receive), the size parameter indicates how much data has been received.

Errors

    EFAULT invalid buffer size

    EINTR the function call was interrupted by a signal

    ESRCH the process ID does not exist

See Also

SrrSend, SrrReply