Remove no longer needed ifdefs in the LinuxKPI, after r341787.
Differential Revision: https://reviews.freebsd.org/D18450 Reviewed by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
dd98a579d3
commit
b2b1b7040b
@ -78,15 +78,7 @@ atomic_long_dec(atomic_long_t *v)
|
||||
static inline long
|
||||
atomic_long_xchg(atomic_long_t *v, long val)
|
||||
{
|
||||
#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__)
|
||||
return atomic_swap_long(&v->counter, val);
|
||||
#else
|
||||
long ret = atomic_long_read(v);
|
||||
|
||||
while (!atomic_fcmpset_long(&v->counter, &ret, val))
|
||||
;
|
||||
return (ret);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline long
|
||||
|
@ -128,15 +128,7 @@ atomic_clear_mask(unsigned int mask, atomic_t *v)
|
||||
static inline int
|
||||
atomic_xchg(atomic_t *v, int i)
|
||||
{
|
||||
#if !defined(__mips__)
|
||||
return (atomic_swap_int(&v->counter, i));
|
||||
#else
|
||||
int ret = atomic_read(v);
|
||||
|
||||
while (!atomic_fcmpset_int(&v->counter, &ret, i))
|
||||
;
|
||||
return (ret);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
Loading…
Reference in New Issue
Block a user