MsgCurrent(), MsgCurrent_r()

Resume processing of a message

Synopsis:

#include <sys/neutrino.h>

int MsgCurrent( int rcvid );

int MsgCurrent_r( int rcvid );

Arguments:

rcvid
The receive ID that MsgReceive*() returned when you received the message.

Library:

libc

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

Description:

The MsgCurrent() and MsgCurrent_r() kernel calls announce to the kernel that you are resuming the processing of a previously received message. These functions are identical except in the way they indicate errors. See the Returns section for details. The kernel checks that the thread identified by rcvid is still valid and is reply-blocked on the connection associated with that rcvid.

If the channel doesn't have _NTO_CHF_FIXED_PRIORITY set in its flags, then the appropriate priority adjustment will be made to the calling thread's priority.

Blocking states

None. If priority inheritance causes the priority of the calling thread to drop, other threads may run.

Returns:

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

MsgCurrent()
If successful, this function returns EOK. If an error occurs, it returns -1 and sets errno.
MsgCurrent_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:

ESRCH
The thread associated with the rcvid isn't in either STATE_REPLY or STATE_NET_REPLY, or it isn't blocked on the connection associated with the rcvid.

Classification:

QNX Neutrino

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