PxInterruptRelease()
Release an interrupt object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxInterrupt_t PxInterruptRelease (PxInterrupt_t Interrupt);
- ARGUMENTS
|
- RETURN VALUES
-
-
Invalid interrupt object on success
-
Interrupt object on failure
-
- ERROR CODES
-
PXERR_INTERRUPT_ILLINTERRUPT
Interrupt is not a valid interrupt object
PXERR_OPOOL_ILLOPOOL
Not a valid object pool
PXERR_GLOBAL_ILLEGAL_CORE
the requested object pool is not on the same core
PXERR_TASK_ILLTASK
not a valid task object
PXERR_INTERNAL_INCONSISTENCY
allocated object not convertible
- DESCRIPTION
-
PxInterruptRelease releases the interrupt object Interrupt by converting it into a generic object and releasing this object.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
Interrupt
must be a valid PXROS-HR interrupt object created with aPxInterruptRequest
call (V). The validity ofInterrupt
may also be checked by thePxInterruptIsValid
macro (F).
-
- After call
-
-
PxInterruptRelease
returns the interrupt object to the object pool it has been taken from. On successPxInterruptRelease
returns the invalidated interrupt object. This may be checked with one of the following macros:-
PxInterruptIdIsValid()
must be false. -
PxInterruptIdGet()
must be_PXIllegalObjId
. -
PxInterruptIdError()
must bePXERR_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
After
PxInterruptRelease
, the given interrupt objectInterrupt
is no longer valid and may never be used as interrupt object!
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxInterrupt_t Interrupt = PxInterruptRelease(Interrupt); if (PxInterruptIdError(Interrupt) == PXERR_NOERROR) { // Report error }