cds  2.3.2
cds::OS::Linux::topology Struct Reference

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.
 

Detailed Description

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

Member Function Documentation

◆ current_processor()

static unsigned int cds::OS::Linux::topology::current_processor ( )
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.


The documentation for this struct was generated from the following file:

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:53 by Doxygen 1.8.13