PxMsgSetToAwaitRel()
Sets the message to AwaitRelease.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxMsgSetToAwaitRel (PxMsg_t Msg);
- ARGUMENTS
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_MSG_ILLMSG
Msg
is not a valid message objectPXERR_MSG_ILLOWNER
The calling task is not the message’s owner
- DESCRIPTION
-
PxMsgSetToAwaitRel sets the message to AwaitRelease. Further calls to PxMsgRelease will only mark this message as released but doesn’t really release it. The owner of this message has to wait for the release and is also responsible for releasing the message. This call is only valid for the message owner.
- 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).
-
-
- After call
-
-
The function returns
PXERR_NOERROR
if the message is set toAwaitRelease
. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
PxMsgSetToAwaitRel
sets the message toAwaitRelease
. Further calls toPxMsgRelease
will only mark this message as released but don’t really release them. The owner of this message has to wait for the release and is also responsible for releasing the message. This call is only valid for the message owner.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t Err = PxMsgSetToAwaitRel(Msg); if (Err != PXERR_NOERROR) { // Report error }