mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
- 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:
@@ -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
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user