From 611dbb6d22ae33be3075623ed18da57729f7d108 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 9 Feb 2021 13:07:03 +0900 Subject: [PATCH] include: nuttx: Introduce spinlock_t for #ifndef CONFIG_SPINLOCK Summary: - This commit introduces spinlock_t for #ifndef CONFIG_SPINLOCK which is useful for the non-SMP case because it does not consume memory Impact: - None: Testing: - N/A Signed-off-by: Masayuki Ishikawa --- include/nuttx/spinlock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index aadf26b50e3..74e1714fbe4 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -30,7 +30,11 @@ #include #include -#ifdef CONFIG_SPINLOCK +#ifndef CONFIG_SPINLOCK +typedef struct +{ +} spinlock_t; +#else /* The architecture specific spinlock.h header file must also provide the * following: