From 9dd59c1f1381ad7645039e33b7c2120078bfa349 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 24 Sep 2013 16:59:11 +0200 Subject: [PATCH] Remove unneeded NetBSD code path from atomic.h. --- mono/utils/atomic.h | 50 --------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h index 56cfd181116..905c53e8505 100755 --- a/mono/utils/atomic.h +++ b/mono/utils/atomic.h @@ -11,16 +11,6 @@ #ifndef _WAPI_ATOMIC_H_ #define _WAPI_ATOMIC_H_ -#if defined(__NetBSD__) -#include - -#if __NetBSD_Version__ > 499004000 -#include -#define HAVE_ATOMIC_OPS -#endif - -#endif - #include "config.h" #include @@ -105,46 +95,6 @@ static inline gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 #endif - -#elif defined(__NetBSD__) && defined(HAVE_ATOMIC_OPS) - -static inline gint32 InterlockedCompareExchange(volatile gint32 *dest, - gint32 exch, gint32 comp) -{ - return atomic_cas_32((uint32_t*)dest, comp, exch); -} - -static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp) -{ - return atomic_cas_ptr(dest, comp, exch); -} - -static inline gint32 InterlockedIncrement(volatile gint32 *val) -{ - return atomic_inc_32_nv((uint32_t*)val); -} - -static inline gint32 InterlockedDecrement(volatile gint32 *val) -{ - return atomic_dec_32_nv((uint32_t*)val); -} - -static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_val) -{ - return atomic_swap_32((uint32_t*)val, new_val); -} - -static inline gpointer InterlockedExchangePointer(volatile gpointer *val, - gpointer new_val) -{ - return atomic_swap_ptr(val, new_val); -} - -static inline gint32 InterlockedExchangeAdd(volatile gint32 *val, gint32 add) -{ - return atomic_add_32_nv((uint32_t*)val, add) - add; -} - #elif (defined(sparc) || defined (__sparc__)) && defined(__GNUC__) G_GNUC_UNUSED -- 2.25.1