PxMbxRelease()
Release a mailbox object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxMbx_t PxMbxRelease (PxMbx_t Mbx);
- ARGUMENTS
|
- RETURN VALUES
-
-
Invalid mailbox handle on success
-
Mailbox on failure
-
- ERROR CODES
-
PXERR_MBX_ILLMBX
Mbx
is not a valid mailbox objectPXERR_MBX_PRIVMBXDELETE
Mailbox delete failed: private mailbox
PXERR_MBX_LEFTMESSAGES
Mailbox delete failed: messages left in the mailbox
PXERR_MBX_TASKWAITS
Mailbox delete failed: task(s) waiting at the mailbox
PXERR_OPOOL_ILLOPOOL
The object pool is not valid
PXERR_GLOBAL_ILLEGAL_CORE
The requested object pool is not on the same core
PXERR_TASK_ILLTASK
The task is not a valid task object
- DESCRIPTION
-
PxMbxRelease releases the mailbox handle Mbx by converting it into a generic object and releasing this object.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Mbx
must be a valid PXROS-HR mailbox object created with aPxMbxRequest
call (V). The validity ofMbx
may also be checked by thePxMbxIsValid
macro (F).
-
- After call
-
-
PxMbxRelease
returns the mailbox object to the object pool it has been taken from. On successPxMbxRelease
returns the invalidated mailbox object. This may be checked with one of the following macros:-
PxMbxIsValid()
must be false. -
PxMbxGet()
must be_PXIllegalObjId
. -
PxMbxError()
must bePXERR_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxMbxRelease
, the given mailbox objectMbx
is no longer valid and may never be used as mailbox object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxMbx_t Mbx = PxMbxRelease(Mbx); if (PxMbxIdError(Mbx) == PXERR_NOERROR) { // Report error }