cds
2.3.2
|
System topology. More...
#include <cds/os/linux/topology.h>
Static Public Member Functions | |
static unsigned int | processor_count () |
Logical processor count for the system. | |
static unsigned int | current_processor () |
Get current processor number. More... | |
static unsigned int | native_current_processor () |
Synonym for current_processor. | |
System topology.
The implementation assumes that processor IDs are in numerical order from 0 to N - 1, where N - count of processor in the system
|
inlinestatic |
Get current processor number.
Caveat: current_processor
calls system sched_getcpu
function that may not be defined for target system (sched_getcpu
is available since glibc 2.6). If sched_getcpu
is not defined the function emulates "current processor number" using thread-specific data. You may manually disable the sched_getcpu
usage compiling with -DCDS_LINUX_NO_sched_getcpu
.