sched: Define sched_getcpu return 0 when CONFIG_SMP equals n

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
cuiziwei 2023-08-04 17:31:31 +08:00 committed by Petro Karashchenko
parent c1ddfcfa83
commit 6289205104
1 changed files with 2 additions and 0 deletions

View File

@ -253,6 +253,8 @@ int sched_setaffinity(pid_t pid, size_t cpusetsize,
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_getcpu(void);
#else
# define sched_getcpu() 0
#endif /* CONFIG_SMP */
/* Task Switching Interfaces (non-standard) */