Raw Spinlock
include/sync/raw_spinlock.h View source View on GitHubStructs
Section titled “Structs”raw_spinlock_high_guard
Section titled “raw_spinlock_high_guard” struct raw_spinlock_high_guard (2 fields) source
§
struct raw_spinlock *lock §
bool irqs_were_enabled Functions
Section titled “Functions”raw_spinlock_init
Section titled “raw_spinlock_init”void raw_spinlock_init(struct raw_spinlock *lock) source raw_spin_trylock
Section titled “raw_spin_trylock”cc_warn_unused_result bool raw_spin_trylock(struct raw_spinlock *lock) source raw_spin_lock
Section titled “raw_spin_lock”void raw_spin_lock(struct raw_spinlock *lock) source raw_spin_unlock
Section titled “raw_spin_unlock”void raw_spin_unlock(struct raw_spinlock *lock) source raw_spin_lock_high
Section titled “raw_spin_lock_high”cc_warn_unused_result bool raw_spin_lock_high(struct raw_spinlock *lock) source whether interrupts were enabled on entry
raw_spin_unlock_irq_restore
Section titled “raw_spin_unlock_irq_restore”void raw_spin_unlock_irq_restore(
struct raw_spinlock *lock,
bool irqs_were_enabled
) source raw_spin_guard_assume
Section titled “raw_spin_guard_assume”void raw_spin_guard_assume(struct raw_spinlock *lock) source raw_spin_guard_exit
Section titled “raw_spin_guard_exit”void raw_spin_guard_exit(struct raw_spinlock **lock) source raw_spin_guard_enter
Section titled “raw_spin_guard_enter”struct raw_spinlock * raw_spin_guard_enter(struct raw_spinlock *lock) source raw_spin_high_guard_exit
Section titled “raw_spin_high_guard_exit”void raw_spin_high_guard_exit(struct raw_spinlock_high_guard *g) source raw_spin_high_guard_enter
Section titled “raw_spin_high_guard_enter”struct raw_spinlock_high_guard raw_spin_high_guard_enter(struct raw_spinlock *lock) source Variables
Section titled “Variables”atomic_uint8_t state source Macros
Section titled “Macros”RAW_SPINLOCK_INIT
Section titled “RAW_SPINLOCK_INIT”#define RAW_SPINLOCK_INIT ((struct raw_spinlock) {.state = ATOMIC_VAR_INIT(0)}) source RAW_SPINLOCK_DEFINE
Section titled “RAW_SPINLOCK_DEFINE”#define RAW_SPINLOCK_DEFINE(id) source Expansion
#define RAW_SPINLOCK_DEFINE(id) struct raw_spinlock id = RAW_SPINLOCK_INIT raw_spin_guard
Section titled “raw_spin_guard”#define raw_spin_guard(lock_) source Expansion
#define raw_spin_guard(lock_) \
cc_cleanup(raw_spin_guard_exit) struct raw_spinlock *PP_CONCAT( \
raw_spin_guard_, __COUNTER__) = \
(raw_spin_guard_assume(lock_), raw_spin_guard_enter(lock_)) raw_spin_guard_high
Section titled “raw_spin_guard_high”#define raw_spin_guard_high(lock_) source Expansion
#define raw_spin_guard_high(lock_) \
cc_cleanup(raw_spin_high_guard_exit) struct raw_spinlock_high_guard \
PP_CONCAT(raw_spin_guard_high_, __COUNTER__) = \
(raw_spin_guard_assume(lock_), raw_spin_high_guard_enter(lock_))