mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
syscall: Expose sched_getaffinity and sched_setaffinity
This commit is contained in:
@@ -81,9 +81,12 @@
|
|||||||
#define SYS_sched_setscheduler (CONFIG_SYS_RESERVED + 10)
|
#define SYS_sched_setscheduler (CONFIG_SYS_RESERVED + 10)
|
||||||
#define SYS_sched_unlock (CONFIG_SYS_RESERVED + 11)
|
#define SYS_sched_unlock (CONFIG_SYS_RESERVED + 11)
|
||||||
#define SYS_sched_yield (CONFIG_SYS_RESERVED + 12)
|
#define SYS_sched_yield (CONFIG_SYS_RESERVED + 12)
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
# define SYS_sched_getcpu (CONFIG_SYS_RESERVED + 13)
|
# define SYS_sched_getaffinity (CONFIG_SYS_RESERVED + 13)
|
||||||
# define __SYS_set_errno (CONFIG_SYS_RESERVED + 14)
|
# define SYS_sched_getcpu (CONFIG_SYS_RESERVED + 14)
|
||||||
|
# define SYS_sched_setaffinity (CONFIG_SYS_RESERVED + 15)
|
||||||
|
# define __SYS_set_errno (CONFIG_SYS_RESERVED + 16)
|
||||||
#else
|
#else
|
||||||
# define __SYS_set_errno (CONFIG_SYS_RESERVED + 13)
|
# define __SYS_set_errno (CONFIG_SYS_RESERVED + 13)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
"rewinddir","dirent.h","","void","FAR DIR*"
|
"rewinddir","dirent.h","","void","FAR DIR*"
|
||||||
"rmdir","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*"
|
"rmdir","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*"
|
||||||
"rmmod","nuttx/module.h","defined(CONFIG_MODULE)","int","FAR void *"
|
"rmmod","nuttx/module.h","defined(CONFIG_MODULE)","int","FAR void *"
|
||||||
|
"sched_getaffinity","sched.h","defined(CONFIG_SMP)","int","pid_t","size_t","FAR cpu_set_t*"
|
||||||
"sched_getcpu","sched.h","defined(CONFIG_SMP)","int"
|
"sched_getcpu","sched.h","defined(CONFIG_SMP)","int"
|
||||||
"sched_getparam","sched.h","","int","pid_t","struct sched_param*"
|
"sched_getparam","sched.h","","int","pid_t","struct sched_param*"
|
||||||
"sched_getscheduler","sched.h","","int","pid_t"
|
"sched_getscheduler","sched.h","","int","pid_t"
|
||||||
@@ -126,6 +127,7 @@
|
|||||||
"sched_lock","sched.h","","int"
|
"sched_lock","sched.h","","int"
|
||||||
"sched_lockcount","sched.h","","int32_t"
|
"sched_lockcount","sched.h","","int32_t"
|
||||||
"sched_rr_get_interval","sched.h","","int","pid_t","struct timespec*"
|
"sched_rr_get_interval","sched.h","","int","pid_t","struct timespec*"
|
||||||
|
"sched_setaffinity","sched.h","defined(CONFIG_SMP)","int","pid_t","size_t","FAR const cpu_set_t*"
|
||||||
"sched_setparam","sched.h","","int","pid_t","const struct sched_param*"
|
"sched_setparam","sched.h","","int","pid_t","const struct sched_param*"
|
||||||
"sched_setscheduler","sched.h","","int","pid_t","int","const struct sched_param*"
|
"sched_setscheduler","sched.h","","int","pid_t","int","const struct sched_param*"
|
||||||
"sched_unlock","sched.h","","int"
|
"sched_unlock","sched.h","","int"
|
||||||
|
|||||||
|
@@ -57,8 +57,11 @@ SYSCALL_LOOKUP(sched_setparam, 2, STUB_sched_setparam)
|
|||||||
SYSCALL_LOOKUP(sched_setscheduler, 3, STUB_sched_setscheduler)
|
SYSCALL_LOOKUP(sched_setscheduler, 3, STUB_sched_setscheduler)
|
||||||
SYSCALL_LOOKUP(sched_unlock, 0, STUB_sched_unlock)
|
SYSCALL_LOOKUP(sched_unlock, 0, STUB_sched_unlock)
|
||||||
SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield)
|
SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield)
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
SYSCALL_LOOKUP(sched_getaffinity, 3, STUB_sched_getaffinity)
|
||||||
SYSCALL_LOOKUP(sched_getcpu, 0, STUB_sched_getcpu)
|
SYSCALL_LOOKUP(sched_getcpu, 0, STUB_sched_getcpu)
|
||||||
|
SYSCALL_LOOKUP(sched_setaffinity, 3, STUB_sched_setaffinity)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
|
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
|
||||||
|
|||||||
@@ -72,7 +72,12 @@ uintptr_t STUB_sched_setscheduler(int nbr, uintptr_t parm1, uintptr_t parm2,
|
|||||||
uintptr_t parm3);
|
uintptr_t parm3);
|
||||||
uintptr_t STUB_sched_unlock(int nbr);
|
uintptr_t STUB_sched_unlock(int nbr);
|
||||||
uintptr_t STUB_sched_yield(int nbr);
|
uintptr_t STUB_sched_yield(int nbr);
|
||||||
|
|
||||||
|
uintptr_t STUB_sched_getaffinity(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||||
|
uintptr_t parm3);
|
||||||
uintptr_t STUB_sched_getcpu(int nbr);
|
uintptr_t STUB_sched_getcpu(int nbr);
|
||||||
|
uintptr_t STUB_sched_setaffinity(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||||
|
uintptr_t parm3);
|
||||||
|
|
||||||
uintptr_t STUB_set_errno(int nbr, uintptr_t parm1);
|
uintptr_t STUB_set_errno(int nbr, uintptr_t parm1);
|
||||||
uintptr_t STUB_uname(int nbr, uintptr_t parm1);
|
uintptr_t STUB_uname(int nbr, uintptr_t parm1);
|
||||||
|
|||||||
Reference in New Issue
Block a user