mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
sched/sched/sched_getcpu.c: Implement non-standard interface.
If SMP is enabled this function will return the number of the CPU that the thread is running on. This is non-standard but follows GLIBC if __GNU_SOURCE is enabled. The returned CPU number is, however, worthless since it returns the CPU number of the CPU that was executing the task when the function was called. The application can never know the true CPU number of the CPU tht it is running on since that value is volatile and change change at any time.
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
"rewinddir","dirent.h","","void","FAR DIR*"
|
||||
"rmdir","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*"
|
||||
"rmmod","nuttx/module.h","defined(CONFIG_MODULE)","int","FAR void *"
|
||||
"sched_getcpu","sched.h","defined(CONFIG_SMP)","int"
|
||||
"sched_getparam","sched.h","","int","pid_t","struct sched_param*"
|
||||
"sched_getscheduler","sched.h","","int","pid_t"
|
||||
"sched_getstreams","nuttx/sched.h","CONFIG_NFILE_STREAMS > 0","FAR struct streamlist*"
|
||||
|
||||
|
Reference in New Issue
Block a user