- Use Boost Winapi as much as possible (let's see if this fixes #105)

- Disable buggy and old BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME method.
This commit is contained in:
Ion Gaztañaga
2020-06-03 00:56:47 +02:00
parent c87039b6c4
commit 037c2dfe5e
4 changed files with 328 additions and 1130 deletions

View File

@@ -229,7 +229,7 @@ inline long double get_current_process_creation_time()
inline unsigned int get_num_cores()
{
winapi::system_info sysinfo;
winapi::interprocess_system_info sysinfo;
winapi::get_system_info( &sysinfo );
//in Windows dw is long which is equal in bits to int
return static_cast<unsigned>(sysinfo.dwNumberOfProcessors);

File diff suppressed because it is too large Load Diff

View File

@@ -23,8 +23,6 @@
#define BOOST_INTERPROCESS_WINDOWS
#define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
//Define this to connect with shared memory created with versions < 1.54
//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
#else
#include <unistd.h>

View File

@@ -383,7 +383,7 @@ inline mapped_region::mapped_region()
template<int dummy>
inline std::size_t mapped_region::page_size_holder<dummy>::get_page_size()
{
winapi::system_info info;
winapi::interprocess_system_info info;
winapi::get_system_info(&info);
return std::size_t(info.dwAllocationGranularity);
}