diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
commit | bb4dd8289b351fae6b55e303f189127a394a1edd (patch) | |
tree | 77c9c35a31b1459dd7988c2448e797d142530c41 /boost/thread/win32/thread_primitives.hpp | |
parent | 1a78a62555be32868418fe52f8e330c9d0f95d5a (diff) | |
download | boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.gz boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.bz2 boost-bb4dd8289b351fae6b55e303f189127a394a1edd.zip |
Imported Upstream version 1.51.0upstream/1.51.0
Diffstat (limited to 'boost/thread/win32/thread_primitives.hpp')
-rw-r--r-- | boost/thread/win32/thread_primitives.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/boost/thread/win32/thread_primitives.hpp b/boost/thread/win32/thread_primitives.hpp index 0166f37d36..294e42ee9b 100644 --- a/boost/thread/win32/thread_primitives.hpp +++ b/boost/thread/win32/thread_primitives.hpp @@ -341,22 +341,42 @@ namespace boost { inline bool interlocked_bit_test_and_set(long* x,long bit) { +#if 0 __asm { mov eax,bit; mov edx,x; lock bts [edx],eax; setc al; }; +#else + bool ret; + __asm { + mov eax,bit; mov edx,x; lock bts [edx],eax; setc al; mov ret, al + }; + return ret; + +#endif } inline bool interlocked_bit_test_and_reset(long* x,long bit) { +#if 0 __asm { mov eax,bit; mov edx,x; lock btr [edx],eax; setc al; }; +#else + + + bool ret; + __asm { + mov eax,bit; mov edx,x; lock btr [edx],eax; setc al; mov ret, al + }; + return ret; + +#endif } } |