PxInterruptRelease()

Release an interrupt object.

APPLIES TO

8.2.0

SYNOPSIS
PxInterrupt_t PxInterruptRelease (PxInterrupt_t Interrupt);
ARGUMENTS
Interrupt

Interrupt object to be released

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 a PxInterruptRequest call (V). The validity of Interrupt may also be checked by the PxInterruptIsValid macro (F).

After call
  • PxInterruptRelease returns the interrupt object to the object pool it has been taken from. On success PxInterruptRelease 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 be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

Best Practice
  • After PxInterruptRelease, the given interrupt object Interrupt 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
}