PxDelayRelease()
Release a delay object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxDelay_t PxDelayRelease (PxDelay_t Delay);
- ARGUMENTS
|
- RETURN VALUES
-
-
Invalid delay handle on success
-
Delay on failure
-
- ERROR CODES
-
PXERR_DELAY_ILLDELAY
Delay is not a valid delay object
PXERR_GLOBAL_ILLEGAL_CORE
The requested object pool is not on the same core
PXERR_DELAY_USED_BY_INTERRUPT
Delay object currently in use by the interrupt handler
PXERR_OPOOL_ILLOPOOL
The object pool is not valid
PXERR_TASK_ILLTASK
The task is not a valid task object
PXERR_INTERNAL_INCONSISTENCY
Inconsistency of internal structures
- DESCRIPTION
-
PxDelayRelease releases the delay job handle Delay by converting it into a generic object and releasing this object. If Delay is in use, the corresponding job is cancelled.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Delay
must be a valid PXROS-HR delay object created with aPxDelayRequest
call (V). The validity ofDelay
may also be checked by thePxDelayIsValid
macro (F). The delay object must be created on the same core as the caller runs on. The creator core id can be read with the macroPxDelayCoreId
and the own core id withPxGetCoreId
(C).
-
- After call
-
-
PxDelayRelease
returns the delay object to the object pool it has been taken from. On successPxDelayRelease
returns the invalidated delay object. This may be checked with one of the following macros:-
PxDelayIdIsValid()
must be false. -
PxDelayIdGet()
must not be_PXIllegalObjId
. -
PxDelayIdError()
must bePXERR_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxDelayRelease
, the given delay objectDelay
is no longer valid and may never be used as delay object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxDelay_t Delay = PxDelayRelease(Delay); if PxDelayIdError(Delay) == PXERR_NOERROR) { // Report error }