This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 6289205104 sched: Define sched_getcpu return 0 when CONFIG_SMP equals n
6289205104 is described below
commit 62892051046c6363184991dfa6ff45e93cc71330
Author: cuiziwei <[email protected]>
AuthorDate: Fri Aug 4 17:31:31 2023 +0800
sched: Define sched_getcpu return 0 when CONFIG_SMP equals n
Signed-off-by: cuiziwei <[email protected]>
---
include/sched.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sched.h b/include/sched.h
index f1b77408bd..968268db4d 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -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) */