PxMsgForceRelease()
Release messages if PxRuntask is owner/user.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxMsgForceRelease (PxMsg_t msgId); - ARGUMENTS
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_MSG_ILLMSGThe passed message handle is invalid
PXERR_MSG_ILLOWNERThe message has no owner
PXERR_MSG_ILLUSERThe caller is not the user of the message
PXERR_PROT_ILL_HANDLEThe associated protection handle is not valid
PXERR_MBX_ILLMBXThe passed mailbox handle is invalid
PXERR_REQUEST_INVALID_PARAMETERRequest with invalid parameter
PXERR_OPOOL_ILLOPOOLThe passed object pool handle is invalid
PXERR_MC_ILLMCThe memory class for the message is invalid
PXERR_INIT_ILLMCTYPEThe type for
PXMcSystemdefaultis different fromPXMcVarsized,PXMcVarsizedAdjustedandPXMcVarsizedAlignedPXERR_MC_DAMAGED_BLOCKThe block in memory class has been damaged
PXERR_MC_INCONSISTENCYInconsistency in memory class:
blkPXERR_MC_ILLALIGNInvalid memory block or size alignment in memory insert
PXERR_MC_ILLSIZEInsufficient block size
PXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
PXERR_TASK_ILLTASKThe task is not a valid task object
PXERR_INTERNAL_INCONSISTENCYInconsistency of internal structures
- DESCRIPTION
-
PxMsgForceReleasewill release the message if the caller is the user of the message. If the caller is the owner of the message,PxMsgForceReleasemarks this message to release. The flag forPxMsgAwaitRelis cleared and any defined release mailbox will be deleted.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
msgIdmust 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_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The function returns
PXERR_NOERRORif the message could be released. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t Err = PxMsgForceRelease(msgId); if (Err != PXERR_NOERROR) { // Report error }