svn commit: r341682 - head/sys/sys

Mateusz Guzik mjg at FreeBSD.org
Fri Dec 7 12:05:12 UTC 2018


Author: mjg
Date: Fri Dec  7 12:05:11 2018
New Revision: 341682
URL: https://svnweb.freebsd.org/changeset/base/341682

Log:
  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

Modified:
  head/sys/sys/systm.h

Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h	Fri Dec  7 12:02:31 2018	(r341681)
+++ head/sys/sys/systm.h	Fri Dec  7 12:05:11 2018	(r341682)
@@ -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
 


More information about the svn-src-head mailing list