MsgVerifyEvent(), MsgVerifyEvent_r()

Check the validity of a receive ID and an event configuration

Synopsis:

#include <sys/neutrino.h>

int MsgVerifyEvent( int rcvid,
                    const struct sigevent *event );

int MsgVerifyEvent_r( int rcvid,
                      const struct sigevent *event );

Arguments:

rcvid
The receive ID that you want to check.
event
A pointer to a sigevent structure that contains the event you want to check.

Library:

libc

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

Description:

The MsgVerifyEvent() and MsgVerifyEvent_r() kernel calls check the validity of the receive ID rcvid, and the event configuration. You can use these functions to verify that an event is well-formed by a client (pass a rcvid of 0), and by a server (pass a rcvid of the target thread).

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 the MsgVerifyEvent() and MsgVerifyEvent_r() functions is the way they indicate errors:

MsgVerifyEvent()
If successful, this function returns EOK. If an error occurs, this function returns -1 and sets errno.
MsgVerifyEvent_r()
If successful, this function returns EOK. This function does NOT set errno, even on success. If an error occurs, it may return the negative of any value from the Errors section.

Errors:

EACCES
The connection requires registered events, the target process is being loaded or terminated, or the target process's threads are being destroyed.
EBADF
The channel for the pulse delivery doesn't exist.
EBUSY
The event type is SIGEV_THREAD and the target process's threads are being destroyed or a core dump is being created for the target process.
EINVAL
Invalid event structure.
ESRCH
The connection for the pulse doesn't exist.

Classification:

QNX Neutrino

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