forked from boostorg/smart_ptr
Enabled lwm_linux.hpp in lightweight_mutex.hpp.
[SVN r12834]
This commit is contained in:
1 parent
6e6a2a013a
commit
76c19e6111
2 files changed
+4
-3
No files matched your search
@@ -38,8 +38,8 @@
|
|||||||
# include <boost/detail/lwm_nop.hpp>
|
# include <boost/detail/lwm_nop.hpp>
|
||||||
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||||
# include <boost/detail/lwm_win32.hpp>
|
# include <boost/detail/lwm_win32.hpp>
|
||||||
//#elif defined(linux) || defined(__linux) || defined(__linux__)
|
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||||
//# include <boost/detail/lwm_linux.hpp>
|
# include <boost/detail/lwm_linux.hpp>
|
||||||
#elif defined(BOOST_HAS_PTHREADS)
|
#elif defined(BOOST_HAS_PTHREADS)
|
||||||
# include <boost/detail/lwm_pthreads.hpp>
|
# include <boost/detail/lwm_pthreads.hpp>
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
#include <sched.h>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@@ -60,7 +61,7 @@ public:
|
|||||||
while( !atomic_dec_and_test(&m_.a_) )
|
while( !atomic_dec_and_test(&m_.a_) )
|
||||||
{
|
{
|
||||||
atomic_inc(&m_.a_);
|
atomic_inc(&m_.a_);
|
||||||
// sched_yield();
|
sched_yield();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user