Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/vchiq/dist/interface/compat fix atomic_cmpx...



details:   https://anonhg.NetBSD.org/src/rev/51c301a7e4c3
branches:  trunk
changeset: 785704:51c301a7e4c3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Mar 25 22:17:01 2013 +0000

description:
fix atomic_cmpxchg wrapper

diffstat:

 sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h |  8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diffs (21 lines):

diff -r 0aac1e8f02bc -r 51c301a7e4c3 sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h
--- a/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h   Mon Mar 25 22:01:49 2013 +0000
+++ b/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h   Mon Mar 25 22:17:01 2013 +0000
@@ -107,16 +107,10 @@
 #define atomic_add_return(v, p)        atomic_add_int_nv(p, v)
 #define atomic_sub_return(v, p)        atomic_add_int_nv(p, -(v))
 #define atomic_xchg(p, v)      atomic_swap_uint(p, v)
+#define atomic_cmpxchg(p, oldv, newv) atomic_cas_uint(p, oldv, newv)
 
 #define ATOMIC_INIT(v)         (v)
 
-static inline int
-atomic_cmpxchg(atomic_t *v, int oldv, int newv)
-{
-       atomic_cas_uint(v, oldv, newv);
-       return *v;
-}
-
 /*
  * Spinlock API
  */



Home | Main Index | Thread Index | Old Index