Resume processing of a message
int MsgCurrent( int rcvid ); int MsgCurrent_r( int rcvid );
- The receive ID that MsgReceive*() returned when you received the message.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The MsgCurrent() kernel call announces to the kernel that you are resuming the processing of a previously received message. 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. If you call MsgCurrent() on the rcvid pertaining to a low-priority client, then the priority boost given to your thread by a blocked high-priority thread can be lost.
None. If priority inheritance causes the priority of the calling thread to drop, other threads may run.
The only difference between the MsgCurrent() and MsgCurrent_r() functions is the way they indicate errors:
- If an error occurs, -1 is returned and errno is set; otherwise, 0 is returned.
- The number of bytes read. This function does NOT set errno. If an error occurs, the value from the Errors section is returned, otherwise 0 is returned.
- The thread associated with the rcvid is not in either STATE_REPLY or STATE_NET_REPLY, or it is not blocked on the connection associated with the rcvid.