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 <ville.juven@unikie.com>
This commit is contained in:
Ville Juven 2025-05-15 13:42:04 +03:00 committed by dongjiuzhu1
parent 60c9c66839
commit ea15bb9adf

View file

@ -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 */
/****************************************************************************