SRTOS
Loading...
Searching...
No Matches
system_funcs.h File Reference

This header files contains kernel functions that help control system behvaior. More...

#include <stdint.h>
Include dependency graph for system_funcs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void systemENTER_CRITICAL ()
 Enter a critical section by disabling all interrupts.
void systemEXIT_CRITICAL ()
 Exit a critical section by enabling all interrupts.

Detailed Description

This header files contains kernel functions that help control system behvaior.

Warning
Only low-level system components and startup code should include this file.

Definition in file system_funcs.h.

Function Documentation

◆ systemENTER_CRITICAL()

void systemENTER_CRITICAL ( )

Enter a critical section by disabling all interrupts.

Warning
This function should not be called by user code.

Definition at line 16 of file system_funcs.c.

17{
18 /* Mask priorities 0xE0 to 0xFF, which includes
19 * SysTick_Handler and PendSV_Handler
20 */
21 __asm volatile ("MOV r0, #0xE0\n"
22 "MSR BASEPRI, r0\n"
23 "ISB\n");
24}
Here is the caller graph for this function:

◆ systemEXIT_CRITICAL()

void systemEXIT_CRITICAL ( )

Exit a critical section by enabling all interrupts.

Warning
This function should not be called by user code.

Definition at line 32 of file system_funcs.c.

33{
34 __asm volatile ("MOV r0, #0x00\n"
35 "MSR BASEPRI, r0\n"
36 "ISB\n");
37}
Here is the caller graph for this function: