MsgInfo(), MsgInfo_r()

Get additional information about a message

Synopsis:

#include <sys/neutrino.h>

int MsgInfo( int rcvid,
             struct _msg_info* info );

int MsgInfo_r( int rcvid,
               struct _msg_info* info );

Arguments:

rcvid
The receive ID that MsgReceive*() returned when you received the message.
info
A pointer to a _msg_info structure where the function can store information about the message.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The MsgInfo() and MsgInfo_r() kernel calls get additional information about a received message and store it in the specified _msg_info structure.

These functions are identical, except in the way they indicate errors. See the Returns section for details.

Note: The info->msglen and info->srcmsglen members are valid only until the next call to MsgRead*() or MsgWrite*().

Blocking states

These calls don't block.

Returns:

The only difference between these functions is the way they indicate errors:

MsgInfo()
If an error occurs, this function returns -1 and sets errno. Any other value returned indicates success.
MsgInfo_r()
If successful, this function returns EOK. This function does NOT set errno, even on success. If an error occurs, it may return any value from the Errors section.

Errors:

EFAULT
A fault occurred when the kernel tried to access the buffers provided.
ESRCH
The thread indicated by rcvid doesn't exist.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes