PxMsgAwaitRel_NoWait()
Checks if a message is released with immediate return.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxMsg_t PxMsgAwaitRel_NoWait (PxMsg_t Msg);
- ARGUMENTS
|
- ERROR CODES
-
PXERR_MSG_NOMSG
The message has been released
PXERR_MSG_ILLMSG
The passed message handle is invalid
PXERR_MSG_ILLOWNER
The calling task is not the owner of the message
PXERR_MSG_NOT_IMPLEMENTED
The message has not been set to wait for its release
- DESCRIPTION
-
PxMsgAwaitRel_NoWait checks if a message, created by PxMsgEnvelop or set to AwaitRelease, is released. To use this function, the calling task must be the owner of the message whose release is being awaited.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Msg
must be a valid message object, requested viaPxMsgRequest…
orPxMsgEnvelop…
or received by aPxMsgReceive…
call (V). This id may be checked with one of the following macros:-
PxMsgIdIsValid()
must be true. -
PxMsgIdGet()
must not be_PXIllegalObjId
. -
PxMsgIdError()
must bePXERR_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
The calling task must be the message’s creator (V), and if the message is created with
PxMsgRequest…
, the message must be prepared by callingPxMsgSetToAwaitRel
(V).
-
- After call
-
-
The return value of
PxMsgAwaitRel
contains the id of the original message, if the message has been released, else the message id is invalid. This may also be checked with the appropriate macros. If the message id is valid, the message may be released byPxMsgRelease
.
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxMsg_t RetMsg = PxMsgAwaitRel_NoWait(Msg) if (PxMsgIdError(RetMsg) == PXERR_MSG_NOMSG) { // Report error } else { // Handle Msg }