Contiki-NG
Functions
Critical sections

Platform-independent functions for critical section entry and exit. More...

Functions

static int_master_status_t critical_enter ()
 Enter a critical section. More...
 
static void critical_exit (int_master_status_t status)
 Exit a critical section and restore the master interrupt. More...
 

Detailed Description

Platform-independent functions for critical section entry and exit.

Function Documentation

◆ critical_enter()

static int_master_status_t critical_enter ( )
inlinestatic

Enter a critical section.

Returns
The status of the master interrupt before entering the critical

This function will return the status of the master interrupt as it was before entering the critical section.

The semantics of the return value are entirely platform-specific. The calling code should not try to determine whether the master interrupt was previously enabled/disabled by interpreting the return value of this function. The return value should only be used as an argument to critical_exit().

Definition at line 65 of file critical.h.

◆ critical_exit()

static void critical_exit ( int_master_status_t  status)
inlinestatic

Exit a critical section and restore the master interrupt.

Parameters
statusThe new status of the master interrupt

The semantics of status are platform-dependent. Normally, the argument provided to this function will be a value previously retrieved through a call to critical_enter().

Definition at line 81 of file critical.h.