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 aca7552d9cab0f4bddd39fac7f869b209f3ecca6
Author: chenzhijia <chenzhi...@xiaomi.com>
AuthorDate: Thu Sep 26 14:38:53 2024 +0800

    nuttx/include:add #define CPU_SETSIZE in sched.h
    
    add #define CPU_SETSIZE in sched.h to pass tlpi example: 
https://man7.org/tlpi/code/online/dist/procpri/t_sched_getaffinity.c.html
    
    Signed-off-by: chenzhijia <chenzhi...@xiaomi.com>
---
 include/sched.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/sched.h b/include/sched.h
index f1702a8819..c8f83aa8a4 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -75,6 +75,10 @@
 
 /* These are not standard but are defined for Linux compatibility */
 
+/* Maximum number of CPUs */
+
+#define CPU_SETSIZE CONFIG_SMP_NCPUS
+
 /* void CPU_ZERO(FAR cpu_set_t *set); */
 
 #define CPU_ZERO(s) do { *(s) = 0; } while (0)

Reply via email to