patacongo commented on issue #37: examples: hello: Show CPU index when running 
in SMP mode
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/37#issuecomment-580250205
 
 
   For pthreads, GNU supports the non-POSIX (_np) function so set affinity and 
also:
   
       int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, FAR 
cpu_set_t *cpuset);
   
   But there is no application interface like this for tasks.  There is the 
internal (only) nxsched_getaffinity().
   
   In NuttX all tasks are the same, so you could argue as Xaio Xiang did that 
nxsched_getaffinity() could then become a systen call, replacing the 
pthread_getaffinity_np() system call . sched_getaffinity() and 
pthread_getaffinity_np() would then be demoted to a libs/libc/pthread functions 
that just invoke the nxsched_getaffinity() system call (nxsched_getaffinity() 
would be the system call because the return values are different for the two 
libs/libc/pthread functions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to