Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Fix brain fart in alignment criterion.
details: https://anonhg.NetBSD.org/src/rev/e3270968e344
branches: trunk
changeset: 967228:e3270968e344
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Dec 03 04:57:38 2019 +0000
description:
Fix brain fart in alignment criterion.
diffstat:
sys/sys/atomic.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 53dd56aaf682 -r e3270968e344 sys/sys/atomic.h
--- a/sys/sys/atomic.h Tue Dec 03 04:57:25 2019 +0000
+++ b/sys/sys/atomic.h Tue Dec 03 04:57:38 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.h,v 1.20 2019/12/01 15:28:02 riastradh Exp $ */
+/* $NetBSD: atomic.h,v 1.21 2019/12/03 04:57:38 riastradh Exp $ */
/*-
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -390,7 +390,6 @@
/* Pre-C11 definitions */
#include <sys/cdefs.h>
-#include <sys/bitops.h>
#ifdef _LP64
#define __HAVE_ATOMIC64_LOADSTORE 1
@@ -408,7 +407,7 @@
#define __ATOMIC_PTR_CHECK(p) do \
{ \
CTASSERT(sizeof(*(p)) <= __ATOMIC_SIZE_MAX); \
- KASSERT(((uintptr_t)(p) & ilog2(sizeof(*(p)))) == 0); \
+ KASSERT(((uintptr_t)(p) & (sizeof(*(p)) - 1)) == 0); \
} while (0)
#ifdef KCSAN
Home |
Main Index |
Thread Index |
Old Index