mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 05:08:41 +08:00
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 <chenzhijia@xiaomi.com>
This commit is contained in:
parent
aca7552d9c
commit
65fbf4cf64
1 changed files with 3 additions and 3 deletions
|
@ -85,15 +85,15 @@
|
||||||
|
|
||||||
/* void CPU_SET(int cpu, FAR cpu_set_t *set); */
|
/* 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); */
|
/* 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); */
|
/* 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); */
|
/* int CPU_COUNT(FAR const cpu_set_t *set); */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue