[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

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 return value from MsgReceive*().
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

This call doesn't block.

Returns:

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

MsgInfo()
If an error occurs, -1 is returned and errno is set. Any other value returned indicates success.
MsgInfo_r()
EOK is returned on success. This function does NOT set errno. If an error occurs, any value in the Errors section may be returned.

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

See also:

ChannelCreate(), _msg_info, MsgRead(), MsgReadv(), MsgReceive(), MsgReceivev(), MsgSend(), MsgSendv(),


[Previous] [Contents] [Index] [Next]