PxToRelease()
Release the timeout object.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxTo_t PxToRelease(PxTo_t To); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid timeout object on success
-
Timeout object on failure
-
- ERROR CODES
-
PXERR_TO_ILLTOTo is not a valid timeout object
PXERR_DELAY_USED_BY_INTERRUPTDelay object currently in use by the interrupt handler
PXERR_OPOOL_ILLOPOOLThe object pool is not valid
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
-
PxToReleasestops the timeout object To (if necessary) and releases the associated resources (allocated byPxToRequest). After this call, To may not be used.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Tomust be a valid PXROS-HR timeout object created with aPxToRequestcall (V). The validity ofTomay also be checked by thePxToIsValidmacro (F).
-
- After call
-
-
PxToReleasereturns the timeout object to the object pool it has been taken from. On successPxToReleasereturns the invalidated timeout object. This may be checked with one of the following macros:-
PxToIdIsValid()must be false. -
PxToIdGet()must be_PXIllegalObjId. -
PxToIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxToRelease, the given timeout objectTois no longer valid and may never be used as timeout object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxTo_t To = PxToRelease(To); if (PxToIdError(To) != PXERR_NOERROR){ // Report error }