MsgInfo(), MsgInfo_r()
QNX SDP8.0C Library ReferenceAPIDeveloper
Get additional information about a message
Synopsis:
#include <sys/neutrino.h>
int MsgInfo( rcvid_t rcvid,
struct _msg_info* info );
int MsgInfo_r( rcvid_t 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.
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 rcvid is invalid.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: