With the new `sos_alloc()' implementation in place, we no longer use
`cmpxchg_ptr()' anywhere.
---
include/libunwind_i.h | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index 15a7973..f015365 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -96,45 +96,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#ifdef HAVE_ATOMIC_OPS_H
# include <atomic_ops.h>
-static inline int
-cmpxchg_ptr (void *addr, void *old, void *new)
-{
- union
- {
- void *vp;
- AO_t *aop;
- }
- u;
-
- u.vp = addr;
- return AO_compare_and_swap(u.aop, (AO_t) old, (AO_t) new);
-}
# define fetch_and_add1(_ptr) AO_fetch_and_add1(_ptr)
# define fetch_and_add(_ptr, value) AO_fetch_and_add(_ptr, value)
- /* GCC 3.2.0 on HP-UX crashes on cmpxchg_ptr() */
-# if !(defined(__hpux) && __GNUC__ == 3 && __GNUC_MINOR__ == 2)
-# define HAVE_CMPXCHG
-# endif
# define HAVE_FETCH_AND_ADD
#else
# ifdef HAVE_IA64INTRIN_H
# include <ia64intrin.h>
-static inline int
-cmpxchg_ptr (void *addr, void *old, void *new)
-{
- union
- {
- void *vp;
- long *vlp;
- }
- u;
-
- u.vp = addr;
- return __sync_bool_compare_and_swap(u.vlp, (long) old, (long) new);
-}
# define fetch_and_add1(_ptr) __sync_fetch_and_add(_ptr, 1)
# define fetch_and_add(_ptr, value) __sync_fetch_and_add(_ptr, value)
-# define HAVE_CMPXCHG
# define HAVE_FETCH_AND_ADD
# endif
#endif
--
1.7.9.5
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel