Remove unneeded NetBSD code path from atomic.h.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Tue, 24 Sep 2013 14:59:11 +0000 (16:59 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Mon, 21 Oct 2013 13:57:24 +0000 (15:57 +0200)
mono/utils/atomic.h

index 56cfd181116bc82f83a1ed3a6515a7b4be9207d0..905c53e8505f6964bebb2da7c0add265903b2e62 100755 (executable)
 #ifndef _WAPI_ATOMIC_H_
 #define _WAPI_ATOMIC_H_
 
-#if defined(__NetBSD__)
-#include <sys/param.h>
-
-#if __NetBSD_Version__ > 499004000
-#include <sys/atomic.h>
-#define HAVE_ATOMIC_OPS
-#endif
-
-#endif
-
 #include "config.h"
 #include <glib.h>
 
@@ -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