sp_counted_base_aix.hpp: switch to lwsync and builtins. Refs #6308.

[SVN r76123]
This commit is contained in:
Peter Dimov
2011-12-23 23:10:37 +00:00
parent faf212f4aa
commit 33ba2c4722

View File

@@ -21,11 +21,15 @@
// //
#include <boost/detail/sp_typeinfo.hpp> #include <boost/detail/sp_typeinfo.hpp>
#include <builtins.h>
#include <sys/atomic_op.h> #include <sys/atomic_op.h>
namespace boost namespace boost
{ {
namespace detail
{
inline void atomic_increment( int32_t* pw ) inline void atomic_increment( int32_t* pw )
{ {
// ++*pw; // ++*pw;
@@ -39,9 +43,9 @@ inline int32_t atomic_decrement( int32_t * pw )
int32_t originalValue; int32_t originalValue;
__asm__ __volatile__( "sync" ); __lwsync();
originalValue = fetch_and_add( pw, -1 ); originalValue = fetch_and_add( pw, -1 );
__asm__ __volatile__( "isync" ); __isync();
return (originalValue - 1); return (originalValue - 1);
} }
@@ -59,9 +63,6 @@ inline int32_t atomic_conditional_increment( int32_t * pw )
} }
} }
namespace detail
{
class sp_counted_base class sp_counted_base
{ {
private: private: