sched.h: add empty realize when NO CONFIG_SMP

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2023-12-20 19:40:02 +08:00 committed by GUIDINGLI
parent 27de65edc0
commit d45a45da94
1 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,9 @@ int sched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask);
int sched_cpucount(FAR const cpu_set_t *set); int sched_cpucount(FAR const cpu_set_t *set);
int sched_getcpu(void); int sched_getcpu(void);
#else #else
# define sched_setaffinity(p, c, m) 0
# define sched_getaffinity(p, c, m) (*(m) |= (1 << 0), 0)
# define sched_cpucount(s) 1
# define sched_getcpu() 0 # define sched_getcpu() 0
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */