From ea15bb9adfdf5fdf7b2ba0f3c52d7464e50bafce Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 15 May 2025 13:42:04 +0300 Subject: [PATCH] nuttx/spinlock: Define empty macros for spin_lock/unlock So that the same code can be used with and without spinlocks. Signed-off-by: Ville Juven --- include/nuttx/spinlock.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 7d9608d26cf..c1013e64015 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -448,6 +448,8 @@ static inline_function void spin_unlock(FAR volatile spinlock_t *lock) # else # define spin_unlock(l) do { *(l) = SP_UNLOCKED; } while (0) # endif +#else +# define spin_unlock(lock) #endif /* CONFIG_SPINLOCK */ /****************************************************************************