Ticket #6308: sp_counted_base_aix_builtin_ns.patch
File sp_counted_base_aix_builtin_ns.patch, 744 bytes (added by , 11 years ago) |
---|
-
sp_counted_base_aix.hpp
21 21 // 22 22 23 23 #include <boost/detail/sp_typeinfo.hpp> 24 #include <builtins.h> 24 25 #include <sys/atomic_op.h> 25 26 26 27 namespace boost 27 28 { 28 29 30 namespace detail 31 { 32 29 33 inline void atomic_increment( int32_t* pw ) 30 34 { 31 35 // ++*pw; … … 39 43 40 44 int32_t originalValue; 41 45 42 __ asm__ __volatile__( "sync");46 __sync(); 43 47 originalValue = fetch_and_add( pw, -1 ); 44 __ asm__ __volatile__( "isync");48 __isync(); 45 49 46 50 return (originalValue - 1); 47 51 } … … 59 63 } 60 64 } 61 65 62 namespace detail63 {64 65 66 class sp_counted_base 66 67 { 67 68 private: