Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 01:04:12 UTC 2021

Modified Files:
        src/sys/external/bsd/common/include/linux: bitops.h

Log Message:
Add BITS_PER_BYTE and BIT_ULL. Fix type of BIT.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/common/include/linux/bitops.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/common/include/linux/bitops.h
diff -u src/sys/external/bsd/common/include/linux/bitops.h:1.9 src/sys/external/bsd/common/include/linux/bitops.h:1.10
--- src/sys/external/bsd/common/include/linux/bitops.h:1.9	Thu Dec  5 20:03:09 2019
+++ src/sys/external/bsd/common/include/linux/bitops.h	Sun Dec 19 01:04:12 2021
@@ -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 @@ hweight64(uint64_t n)
 #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

Reply via email to