Revert r309619 "ifndef atomic_cas_* in cddl code"

It was a temporary change to ease an import of native atomic_cas primitives.
Instead, atomic_fcmpset was devised with different semantics. See r311168.
This commit is contained in:
Mateusz Guzik 2017-01-03 21:02:30 +00:00
parent f7c6177038
commit 619ce4d72e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311170

View File

@ -41,15 +41,11 @@ extern void atomic_add_64(volatile uint64_t *target, int64_t delta);
extern void atomic_dec_64(volatile uint64_t *target);
#endif
#ifndef __sparc64__
#ifndef atomic_cas_32
extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
uint32_t newval);
#endif
#ifndef atomic_cas_64
extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
uint64_t newval);
#endif
#endif
extern uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta);
extern uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value);
extern void membar_producer(void);
@ -127,7 +123,6 @@ atomic_dec_64_nv(volatile uint64_t *target)
return (atomic_add_64_nv(target, -1));
}
#ifndef atomic_cas_ptr
#if !defined(COMPAT_32BIT) && defined(__LP64__)
static __inline void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
@ -143,6 +138,5 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
(uint32_t)cmp, (uint32_t)newval));
}
#endif /* !defined(COMPAT_32BIT) && defined(__LP64__) */
#endif
#endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */