From 2075eb7932ed33db3f34e42bdcd62c0c94d24de2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 19 Feb 2016 16:03:01 -0600 Subject: [PATCH] Fix a typo introduced in the last commit and a file that was missed in the last commit --- include/nuttx/spinlock.h | 2 +- include/sys/types.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 3ce3391b01..544facfef9 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -42,7 +42,7 @@ #include -#include +#include #include #ifdef CONFIG_SPINLOCK diff --git a/include/sys/types.h b/include/sys/types.h index cc6672d2c0..a818cc2a80 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -244,6 +244,20 @@ typedef uint32_t clock_t; typedef uint32_t useconds_t; typedef int32_t suseconds_t; +#ifdef CONFIG_SMP +/* This is the smallest integer type that will hold a bitset of all CPUs */ + +#if (CONFIG_SMP_NCPUS <= 8) +typedef volatile uint8_t cpu_set_t; +#elif (CONFIG_SMP_NCPUS <= 16) +typedef volatile uint16_t cpu_set_t; +#elif (CONFIG_SMP_NCPUS <= 32) +typedef volatile uint32_t cpu_set_t; +#else +# error SMP: Extensions needed to support this number of CPUs +#endif +#endif /* CONFIG_SMP */ + /* BSD types provided only to support porting to NuttX. */ typedef unsigned char u_char;