Add #define ISC_OS_CACHELINE_SIZE 64
Add library ctor and dtor for isc_os compilation unit which initializes the numbers of the CPUs and also checks whether L1 cacheline size is really 64 if the sysconf() call is available.
This commit is contained in:
@@ -14,9 +14,17 @@
|
||||
/*! \file isc/os.h */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*%<
|
||||
* Hardcode the L1 cacheline size of the CPU to 64, this is checked in
|
||||
* the os.c library constructor if operating system provide means to
|
||||
* get the L1 cacheline size using sysconf().
|
||||
*/
|
||||
#define ISC_OS_CACHELINE_SIZE 64
|
||||
|
||||
unsigned int
|
||||
isc_os_ncpus(void);
|
||||
/*%<
|
||||
|
||||
Reference in New Issue
Block a user