PatchworkOS  69292a3
A non-POSIX operating system.
Loading...
Searching...
No Matches
CLI

Clear Interrupt Flag (CLI) Handling. More...

Collaboration diagram for CLI:

Detailed Description

Clear Interrupt Flag (CLI) Handling.

Manages nested CLI (Clear Interrupt Flag) calls.

Macros

#define CLI_SCOPE()
 Macro to increment CLI depth for the duration of the current scope.
 

Functions

static void cli_push (void)
 Increments the CLI depth, disabling interrupts if depth was zero.
 
static void cli_pop (void)
 Decrements the CLI depth, re-enabling interrupts if depth reaches zero and interrupts were enabled prior to the first cli_push() call.
 
static void cli_scope_cleanup (int *_)
 

Macro Definition Documentation

◆ CLI_SCOPE

#define CLI_SCOPE ( )
Value:
cli_push(); \
__attribute__((cleanup(cli_scope_cleanup))) int CONCAT(i, __COUNTER__) = 1;
static void cli_push(void)
Increments the CLI depth, disabling interrupts if depth was zero.
Definition cli.h:24
static void cli_scope_cleanup(int *_)
Definition cli.h:60
#define CONCAT(a, b)
Concatenates two tokens.
Definition defs.h:77

Macro to increment CLI depth for the duration of the current scope.

Definition at line 56 of file cli.h.

Function Documentation

◆ cli_push()

static void cli_push ( void  )
inlinestatic

Increments the CLI depth, disabling interrupts if depth was zero.

Warning
Must have a matching cli_pop() call to re-enable interrupts when depth reaches zero.

Definition at line 24 of file cli.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cli_pop()

static void cli_pop ( void  )
inlinestatic

Decrements the CLI depth, re-enabling interrupts if depth reaches zero and interrupts were enabled prior to the first cli_push() call.

Warning
This function should only be called after a cli_push() call.

Definition at line 42 of file cli.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cli_scope_cleanup()

static void cli_scope_cleanup ( int *  _)
inlinestatic

Definition at line 60 of file cli.h.

Here is the call graph for this function: