diff options
| author | hathach <[email protected]> | 2025-11-19 17:06:19 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-19 17:06:19 +0700 |
| commit | 650c4b061c45c20d3d059f1c5ce6013b700ce1f1 (patch) | |
| tree | df030b97102ffe9ff37209f6c78398e47867d629 /src | |
| parent | bec9676493c51a454541e885ad33030e58d9d257 (diff) | |
return if spin is underflow
Diffstat (limited to 'src')
| -rw-r--r-- | src/osal/osal_none.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h index d9890efbc..174136e38 100644 --- a/src/osal/osal_none.h +++ b/src/osal/osal_none.h @@ -61,13 +61,8 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bo } TU_ATTR_ALWAYS_INLINE static inline void osal_spin_unlock(osal_spinlock_t *ctx, bool in_isr) { - // Check for underflow - unlock without lock if (ctx->nested_count == 0) { - // Re-enable interrupts before asserting to avoid leaving interrupts disabled - if (!in_isr) { - ctx->interrupt_set(true); - } - TU_ASSERT(0,); + return; // spin is not locked to begin with } ctx->nested_count--; |
