7 #ifndef _PICO_CRITICAL_SECTION_H
8 #define _PICO_CRITICAL_SECTION_H
92 return crit_sec->spin_lock != 0;
void critical_section_deinit(critical_section_t *crit_sec)
De-Initialise a critical_section created by the critical_section_init method.
Definition: critical_section.c:22
static void critical_section_enter_blocking(critical_section_t *crit_sec)
Enter a critical_section.
Definition: critical_section.h:61
void critical_section_init(critical_section_t *crit_sec)
Initialise a critical_section structure allowing the system to assign a spin lock number.
Definition: critical_section.c:13
static void critical_section_exit(critical_section_t *crit_sec)
Release a critical_section.
Definition: critical_section.h:70
void critical_section_init_with_lock_num(critical_section_t *crit_sec, uint lock_num)
Initialise a critical_section structure assigning a specific spin lock number.
Definition: critical_section.c:17
static __force_inline uint32_t spin_lock_blocking(spin_lock_t *lock)
Acquire a spin lock safely.
Definition: sync.h:287
static __force_inline void spin_unlock(spin_lock_t *lock, uint32_t saved_irq)
Release a spin lock safely.
Definition: sync.h:314
volatile uint32_t spin_lock_t
A spin lock identifier.
Definition: sync.h:56
static bool critical_section_is_initialized(critical_section_t *crit_sec)
Test whether a critical_section has been initialized.
Definition: critical_section.h:91
recursive mutex instance
Definition: mutex.h:47
Definition: critical_section.h:29