Fix 32-bit build after r367229.
The use of atomic_sub_64() in zfs_zstd.c was breaking the 32-bit build on platforms without native 64-bit atomics due to atomic_sub_64() not being available, and no fallback being provided in _STANDALONE. Provide a standalone stub to match atomic_add_64() using simple math. While this is not actually atomic, it does not matter in libsa context, since it always runs single-threaded and does not run under a scheduler. Reviewed by: mjg (in email)
This commit is contained in:
parent
59402cc58a
commit
bd5e074531
@ -188,6 +188,8 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
|
||||
*/
|
||||
#undef atomic_add_64
|
||||
#define atomic_add_64(ptr, val) *(ptr) += val
|
||||
#undef atomic_sub_64
|
||||
#define atomic_sub_64(ptr, val) *(ptr) -= val
|
||||
#endif /* !_STANDALONE */
|
||||
|
||||
#endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user