Contiki-NG
|
Functions | |
static int_master_status_t | critical_enter () |
Enter a critical section. | |
static void | critical_exit (int_master_status_t status) |
Exit a critical section and restore the master interrupt. | |
Platform-independent functions for critical section entry and exit
|
inlinestatic |
Enter a critical section.
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.
References int_master_read_and_disable().
Referenced by atomic_generic_cas_uint8(), lpm_drop(), mutex_generic_try_lock(), mutex_generic_unlock(), tsch_get_network_uptime_ticks(), and tsch_slot_operation_sync().
|
inlinestatic |
Exit a critical section and restore the master interrupt.
status | The 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.
References int_master_status_set().
Referenced by atomic_generic_cas_uint8(), lpm_drop(), mutex_generic_try_lock(), mutex_generic_unlock(), tsch_get_network_uptime_ticks(), and tsch_slot_operation_sync().