diff options
| author | HiFiPhile <[email protected]> | 2026-06-22 21:23:49 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2026-06-22 21:23:49 +0200 |
| commit | f9698aedaebe9b6edd4a13670cd1bfcb35883136 (patch) | |
| tree | da067c482c0ff272bb9047db16758ec7c4c5d4cb | |
| parent | f7617168e2ce2e7ea2e49cba5962b69aed04900e (diff) | |
osal: add missing osal_spin_deinit()
Signed-off-by: HiFiPhile <[email protected]>
| -rw-r--r-- | src/osal/osal.h | 3 | ||||
| -rw-r--r-- | src/osal/osal_mynewt.h | 4 | ||||
| -rw-r--r-- | src/osal/osal_rtthread.h | 4 | ||||
| -rw-r--r-- | src/osal/osal_rtx4.h | 4 | ||||
| -rw-r--r-- | src/osal/osal_zephyr.h | 4 |
5 files changed, 18 insertions, 1 deletions
diff --git a/src/osal/osal.h b/src/osal/osal.h index a33280425..3fa1ff6bf 100644 --- a/src/osal/osal.h +++ b/src/osal/osal.h @@ -76,7 +76,8 @@ typedef void (*osal_task_func_t)( void * ); // Should be implemented as static inline function in osal_port.h header /* void osal_spin_init(osal_spinlock_t *ctx); - void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) + void osal_spin_deinit(osal_spinlock_t *ctx); + void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr); void osal_spin_unlock(osal_spinlock_t *ctx, bool in_isr); osal_semaphore_t osal_semaphore_create(osal_semaphore_def_t* semdef); diff --git a/src/osal/osal_mynewt.h b/src/osal/osal_mynewt.h index 6d51f8ec3..86279f56e 100644 --- a/src/osal/osal_mynewt.h +++ b/src/osal/osal_mynewt.h @@ -52,6 +52,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) { (void) ctx; } +TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) { + (void) ctx; +} + TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) { if (!TUP_MCU_MULTIPLE_CORE && in_isr) { return; // single core MCU does not need to lock in ISR diff --git a/src/osal/osal_rtthread.h b/src/osal/osal_rtthread.h index a778f5425..e126a2907 100644 --- a/src/osal/osal_rtthread.h +++ b/src/osal/osal_rtthread.h @@ -54,6 +54,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) { rt_spin_lock_init(ctx); } +TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) { + (void) ctx; +} + TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) { if (!TUP_MCU_MULTIPLE_CORE && in_isr) { return; // single core MCU does not need to lock in ISR diff --git a/src/osal/osal_rtx4.h b/src/osal/osal_rtx4.h index 35860ddd5..813b351ff 100644 --- a/src/osal/osal_rtx4.h +++ b/src/osal/osal_rtx4.h @@ -67,6 +67,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) { (void) ctx; } +TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) { + (void) ctx; +} + TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) { (void) ctx; (void) in_isr; } diff --git a/src/osal/osal_zephyr.h b/src/osal/osal_zephyr.h index 91f225f79..f0e1a6a2e 100644 --- a/src/osal/osal_zephyr.h +++ b/src/osal/osal_zephyr.h @@ -50,6 +50,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) { (void) ctx; } +TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) { + (void) ctx; +} + TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) { if (!TUP_MCU_MULTIPLE_CORE && in_isr) { return; // single core MCU does not need to lock in ISR |
