3 #ifndef CDSLIB_OS_OSX_TOPOLOGY_H
4 #define CDSLIB_OS_OSX_TOPOLOGY_H
6 #ifndef CDSLIB_OS_TOPOLOGY_H
7 # error "<cds/os/topology.h> must be included instead"
10 #include <cds/os/details/fake_topology.h>
12 namespace cds { namespace OS {
13 /// Linux-specific wrappers
14 CDS_CXX11_INLINE_NAMESPACE namespace OS_X {
18 The implementation assumes that processor IDs are in numerical order
19 from 0 to N - 1, where N - count of processor in the system
21 struct topology: public OS::details::fake_topology
25 typedef OS::details::fake_topology base_class;
26 static unsigned int s_nProcessorCount;
30 /// Logical processor count for the system
31 static unsigned int processor_count()
33 return s_nProcessorCount;
36 /// Get current processor number
37 static unsigned int current_processor()
39 return base_class::current_processor();
42 /// Synonym for \ref current_processor
43 static unsigned int native_current_processor()
45 return current_processor();
55 #ifndef CDS_CXX11_INLINE_NAMESPACE_SUPPORT
58 }} // namespace cds::OS
60 #endif // #ifndef CDSLIB_OS_OSX_TOPOLOGY_H