OSIntExit

Description

OSIntExit() notifies µC/OS-III that an ISR is complete. This allows µC/OS-III to keep track of interrupt nesting. OSIntExit() is used in conjunction with OSIntEnter(). When the last nested interrupt completes, OSIntExit() determines if a higher priority task is ready-to-run. If so, the interrupt returns to the higher priority task instead of the interrupted task.

This function is typically called at the end of ISRs as follows, and on some CPU architectures, it must be written in assembly language (shown below in pseudo code):

          MyISR:
              Save CPU registers;
              OSIntEnter();
                  :
              Process ISR;
                  :
              OSIntExit();
              Restore CPU registers;
              Return from interrupt;

Files

os.h/os_core.c

Prototype

void  OSIntExit (void)

Arguments

None

Returned Value

None

Required Configuration

None

Callers

ISRs only.

Notes/Warnings

  1. This function must not be called by task-level code. Also, if you decide to directly increment OSIntNestingCtr, instead of calling OSIntEnter(), you must still call OSIntExit().