unr64: use locked variant if not __LP64__

The current ifdefs are not sufficient to distinguish 32- and 64- bit
variants, which results e.g. in powerpc64 not using atomics.

While some 32-bit archs provide 64-bit atomics, there is no huge advantage
of using them on these platforms.

Reported by:	many
Suggested by:	jhb
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
mjg 2018-12-07 12:05:11 +00:00
parent c1fb81f798
commit c54695512c

View File

@ -523,7 +523,7 @@ int alloc_unr_specific(struct unrhdr *uh, u_int item);
int alloc_unrl(struct unrhdr *uh);
void free_unr(struct unrhdr *uh, u_int item);
#if defined(__mips__) || defined(__powerpc__)
#ifndef __LP64__
#define UNR64_LOCKED
#endif