mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-31 21:24:40 +02:00
sp_counted_base_aix.hpp: switch to lwsync and builtins. Refs #6308.
[SVN r76123]
This commit is contained in:
@@ -21,11 +21,15 @@
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <builtins.h>
|
||||
#include <sys/atomic_op.h>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline void atomic_increment( int32_t* pw )
|
||||
{
|
||||
// ++*pw;
|
||||
@@ -39,9 +43,9 @@ inline int32_t atomic_decrement( int32_t * pw )
|
||||
|
||||
int32_t originalValue;
|
||||
|
||||
__asm__ __volatile__( "sync" );
|
||||
__lwsync();
|
||||
originalValue = fetch_and_add( pw, -1 );
|
||||
__asm__ __volatile__( "isync" );
|
||||
__isync();
|
||||
|
||||
return (originalValue - 1);
|
||||
}
|
||||
@@ -59,9 +63,6 @@ inline int32_t atomic_conditional_increment( int32_t * pw )
|
||||
}
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
class sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
Reference in New Issue
Block a user