v1.5.0
Go to the documentation of this file.
7 #ifndef _PICO_CRITICAL_SECTION_H
8 #define _PICO_CRITICAL_SECTION_H
92 return crit_sec->spin_lock != 0;
static bool critical_section_is_initialized(critical_section_t *crit_sec)
Test whether a critical_section has been initialized.
Definition: critical_section.h:91
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
recursive mutex instance
Definition: mutex.h:47
static __force_inline uint32_t spin_lock_blocking(spin_lock_t *lock)
Acquire a spin lock safely.
Definition: sync.h:279
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 __force_inline void spin_unlock(spin_lock_t *lock, uint32_t saved_irq)
Release a spin lock safely.
Definition: sync.h:307
static void critical_section_enter_blocking(critical_section_t *crit_sec)
Enter a critical_section.
Definition: critical_section.h:61
static void critical_section_exit(critical_section_t *crit_sec)
Release a critical_section.
Definition: critical_section.h:70
Definition: critical_section.h:29
volatile uint32_t spin_lock_t
A spin lock identifier.
Definition: sync.h:56
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