This is an automated email from the ASF dual-hosted git repository. ligd pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 65fbf4cf64578daaf6e3b737faa61e43b343dcdd Author: chenzhijia <chenzhi...@xiaomi.com> AuthorDate: Thu Sep 26 17:18:11 2024 +0800 nuttx/include:Modify the CPU_SET series macro definition in sched.h Modify the CPU_SET series macro definition to avoid an error when shifting 31 bits to the left. Signed-off-by: chenzhijia <chenzhi...@xiaomi.com> --- include/sched.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sched.h b/include/sched.h index c8f83aa8a4..332dda4055 100644 --- a/include/sched.h +++ b/include/sched.h @@ -85,15 +85,15 @@ /* void CPU_SET(int cpu, FAR cpu_set_t *set); */ -#define CPU_SET(c,s) do { *(s) |= (1 << (c)); } while (0) +#define CPU_SET(c,s) do { *(s) |= (1u << (c)); } while (0) /* void CPU_CLR(int cpu, FAR cpu_set_t *set); */ -#define CPU_CLR(c,s) do { *(s) &= ~(1 << (c)); } while (0) +#define CPU_CLR(c,s) do { *(s) &= ~(1u << (c)); } while (0) /* int CPU_ISSET(int cpu, FAR const cpu_set_t *set); */ -#define CPU_ISSET(c,s) ((*(s) & (1 << (c))) != 0) +#define CPU_ISSET(c,s) ((*(s) & (1u << (c))) != 0) /* int CPU_COUNT(FAR const cpu_set_t *set); */