PxOpoolRelease()
Release an object pool object.
- APPLIES TO
-
8.2.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_ILLOPOOL
Opool
is not a valid pool objectPXERR_OPOOL_TASKWAITS
A task is waiting at the object pool
PXERR_OPOOL_ILLDELETE
Tried to delete a real object pool with no source
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
PXERR_INTERNAL_INCONSISTENCY
Inconsistency of internal structures
- DESCRIPTION
-
PxOpoolRelease releases the object pool handle Opool by converting it into a generic object and releasing this object.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Opool
must be a valid PXROS-HR object pool created with aPxOpoolRequest
call (V). The validity ofOpool
may also be checked by thePxOpoolIsValid
macro (F).
-
- After call
-
-
PxOpoolRelease
returns the object pool to the object pool it has been taken from. On successPxOpoolRelease
returns 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_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxOpoolRelease
, the given object poolOpool
is 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 }