Ticket #6308: sp_counted_base_aix_lwsync.patch

File sp_counted_base_aix_lwsync.patch, 746 bytes (added by aaron.riekenberg@…, 11 years ago)

Switch from sync to lwsync

  • sp_counted_base_aix.hpp

     
    2121//
    2222
    2323#include <boost/detail/sp_typeinfo.hpp>
     24#include <builtins.h>
    2425#include <sys/atomic_op.h>
    2526
    2627namespace boost
    2728{
    2829
     30namespace detail
     31{
     32
    2933inline void atomic_increment( int32_t* pw )
    3034{
    3135    // ++*pw;
     
    3943
    4044    int32_t originalValue;
    4145
    42     __asm__ __volatile__( "sync" );
     46    __lwsync();
    4347    originalValue = fetch_and_add( pw, -1 );
    44     __asm__ __volatile__( "isync" );
     48    __isync();
    4549
    4650    return (originalValue - 1);
    4751}
     
    5963    }
    6064}
    6165
    62 namespace detail
    63 {
    64 
    6566class sp_counted_base
    6667{
    6768private: