HCore SysProp

Files CCore/inc/sys/SysProp.h CCore/src/sys/SysProp.cpp

This part provides some target properties.


#ifndef CCore_inc_sys_SysProp_h
#define CCore_inc_sys_SysProp_h
 
namespace CCore {
namespace Sys {

/* functions */ 

unsigned GetCpuCount() noexcept;
 
unsigned GetSpinCount() noexcept;
 
} // namespace Sys
} // namespace CCore
 
#endif

GetCpuCount() returns the number of CPU cores.

GetSpinCount() returns the recommended "spin count". This value is used in the Mutex implementation for spinning. It must be null for the single-core processors. For multi-core it has the value of order 1000.