mirror of
https://github.com/boostorg/container.git
synced 2025-07-31 21:14:30 +02:00
Avoid including windows.h
This commit is contained in:
@@ -53,7 +53,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <boost/winapi/critical_section.hpp>
|
||||
#include <boost/winapi/thread.hpp>
|
||||
#ifndef BOOST_MUTEX_HELPER
|
||||
#define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_WIN32
|
||||
#endif
|
||||
@@ -135,7 +136,7 @@
|
||||
#define SPINS_PER_YIELD 63
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
#define SLEEP_EX_DURATION 50 /* delay for yield/sleep */
|
||||
#define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE)
|
||||
#define SPIN_LOCK_YIELD boost::winapi::SleepEx(SLEEP_EX_DURATION, 0)
|
||||
#elif defined (__SVR4) && defined (__sun) /* solaris */
|
||||
#include <thread.h>
|
||||
#define SPIN_LOCK_YIELD thr_yield();
|
||||
|
Reference in New Issue
Block a user