svn commit: r352251 - head/sys/sys
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Sep 12 16:20:04 UTC 2019
Author: hselasky
Date: Thu Sep 12 16:20:03 2019
New Revision: 352251
URL: https://svnweb.freebsd.org/changeset/base/352251
Log:
Use %u instead of %d to print unsigned integer.
While at it remove an empty line.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/sys/refcount.h
Modified: head/sys/sys/refcount.h
==============================================================================
--- head/sys/sys/refcount.h Thu Sep 12 15:57:49 2019 (r352250)
+++ head/sys/sys/refcount.h Thu Sep 12 16:20:03 2019 (r352251)
@@ -85,11 +85,10 @@ refcount_acquire(volatile u_int *count)
static __inline void
refcount_acquiren(volatile u_int *count, u_int n)
{
-
u_int old;
KASSERT(n < REFCOUNT_SATURATION_VALUE / 2,
- ("refcount_acquiren: n %d too large", n));
+ ("refcount_acquiren: n=%u too large", n));
old = atomic_fetchadd_int(count, n);
if (__predict_false(REFCOUNT_SATURATED(old)))
_refcount_update_saturated(count);
@@ -115,7 +114,8 @@ refcount_releasen(volatile u_int *count, u_int n)
u_int old;
KASSERT(n < REFCOUNT_SATURATION_VALUE / 2,
- ("refcount_releasen: n %d too large", n));
+ ("refcount_releasen: n=%u too large", n));
+
atomic_thread_fence_rel();
old = atomic_fetchadd_int(count, -n);
if (__predict_false(n >= REFCOUNT_COUNT(old) ||
More information about the svn-src-all
mailing list