Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux Add BITS_PER_BYTE and ...



details:   https://anonhg.NetBSD.org/src/rev/fe788735a778
branches:  trunk
changeset: 1027886:fe788735a778
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:04:12 2021 +0000

description:
Add BITS_PER_BYTE and BIT_ULL. Fix type of BIT.

diffstat:

 sys/external/bsd/common/include/linux/bitops.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 5ba498baac0b -r fe788735a778 sys/external/bsd/common/include/linux/bitops.h
--- a/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 01:04:05 2021 +0000
+++ b/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 01:04:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitops.h,v 1.9 2019/12/05 20:03:09 maya Exp $  */
+/*     $NetBSD: bitops.h,v 1.10 2021/12/19 01:04:12 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -106,7 +106,10 @@
 #define        BITS_TO_LONGS(n)                                                \
        roundup2((n), (sizeof(unsigned long) * CHAR_BIT))
 
-#define        BIT(n)  ((uintmax_t)1 << (n))
+#define        BITS_PER_BYTE   NBBY
+
+#define        BIT(n)          ((unsigned long)__BIT(n))
+#define        BIT_ULL(n)      ((unsigned long long)__BIT(n))
 #define        GENMASK(h,l)    __BITS(h,l)
 
 static inline int



Home | Main Index | Thread Index | Old Index