PxOpoolRelease()
Release an object pool object.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxOpool_t PxOpoolRelease (PxOpool_t Opool); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid object pool handle on success
-
Object pool on failure
-
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLOpoolis not a valid pool objectPXERR_OPOOL_TASKWAITSA task is waiting at the object pool
PXERR_OPOOL_ILLDELETETried to delete a real object pool with no source
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
-
PxOpoolReleasereleases the object pool handleOpoolby converting it into a generic object and releasing this object.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Opoolmust be a valid PXROS-HR object pool created with aPxOpoolRequestcall (V). The validity ofOpoolmay also be checked by thePxOpoolIsValidmacro (F).
-
- After call
-
-
PxOpoolReleasereturns the object pool to the object pool it has been taken from. On successPxOpoolReleasereturns the invalidated object pool. This may be checked with one of the following macros:-
PxOpoolIdIsValid()must be false. -
PxOpoolIdGet()must be_PXIllegalObjId. -
PxOpoolIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxOpoolRelease, the given object poolOpoolis no longer valid and may never be used as object pool!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxOpool_t Opool = PxOpoolRelease(Opool); if (PxOpoolIdError(Opool) == PXERR_NOERROR) { // Report error }