pure getcpu() example

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-05-13 01:00:00 +00:00
parent a41f924706
commit f17e68a109
5 changed files with 60 additions and 1 deletions

View File

@@ -19006,6 +19006,7 @@ The example in `man futex` is also a must.
Examples:
* link:userland/linux/sched_getcpu.c[]
* link:userland/linux/getcpu.c[]: a wrapper close the the syscall that also returns the current NUMA node
* link:userland/linux/sched_getcpu_barrier.c[]: this uses a barrier to ensure that gem5 will run each thread on one separate CPU
Returns the CPU that the process/thread is currently running on: