Maybe there is a library or ordinary ASM blob that can get the number of current CPU I am executing on .
Use scheduled_getcpu
to determine the CPU on which calling thread Its going on. See the man getcpu
(system call) and man shed-gateQU
(a library cover). However, note what it says:
The information given in the CPU is guaranteed to be activated at the time of the call: Unless the CPU affinity shade_set affinity (2) (Normally this does not happen because the scheduler tries to reduce the speed between the CPU, but this is possible.) When the CPU and the node are not the current CPU and node, then the caller should be ready to handle the situation. Should not
Comments
Post a Comment