mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-01 13:00:59 +02:00
IDF release/v4.4 f23dcd3555 (#5996)
esp-dsp: master 6b25cbb esp-face: master d141502 esp-rainmaker: f1b82c7 esp32-camera: master 61400bc esp_littlefs: master 3c29afc
This commit is contained in:
@ -52,6 +52,15 @@ static inline void __attribute__((always_inline)) spinlock_initialize(spinlock_t
|
||||
|
||||
/**
|
||||
* @brief Top level spinlock acquire function, spins until get the lock
|
||||
*
|
||||
* This function will:
|
||||
* - Save current interrupt state, then disable interrupts
|
||||
* - Spin until lock is acquired or until timeout occurs
|
||||
* - Restore interrupt state
|
||||
*
|
||||
* @note Spinlocks alone do no constitute true critical sections (as this
|
||||
* function reenables interrupts once the spinlock is acquired). For critical
|
||||
* sections, use the interface provided by the operating system.
|
||||
* @param lock - target spinlock object
|
||||
* @param timeout - cycles to wait, passing SPINLOCK_WAIT_FOREVER blocs indefinitely
|
||||
*/
|
||||
@ -125,6 +134,15 @@ static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *l
|
||||
|
||||
/**
|
||||
* @brief Top level spinlock unlock function, unlocks a previously locked spinlock
|
||||
*
|
||||
* This function will:
|
||||
* - Save current interrupt state, then disable interrupts
|
||||
* - Release the spinlock
|
||||
* - Restore interrupt state
|
||||
*
|
||||
* @note Spinlocks alone do no constitute true critical sections (as this
|
||||
* function reenables interrupts once the spinlock is acquired). For critical
|
||||
* sections, use the interface provided by the operating system.
|
||||
* @param lock - target, locked before, spinlock object
|
||||
*/
|
||||
static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *lock)
|
||||
|
Reference in New Issue
Block a user