Module Name: src
Committed By: jmcneill
Date: Mon Mar 25 22:17:01 UTC 2013
Modified Files:
src/sys/external/bsd/vchiq/dist/interface/compat: vchi_bsd.h
Log Message:
fix atomic_cmpxchg wrapper
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h
diff -u src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.1 src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.2
--- src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.1 Fri Mar 8 12:32:30 2013
+++ src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h Mon Mar 25 22:17:01 2013
@@ -107,16 +107,10 @@ typedef volatile unsigned int atomic_t;
#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
*/