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 provide BITS_PER_TYPE



details:   https://anonhg.NetBSD.org/src/rev/25b2b0a4d3ec
branches:  trunk
changeset: 1028208:25b2b0a4d3ec
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:49:47 2021 +0000

description:
provide BITS_PER_TYPE


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

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

diffs (21 lines):

diff -r 3cbdb60bda71 -r 25b2b0a4d3ec sys/external/bsd/common/include/linux/bitops.h
--- a/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 09:49:39 2021 +0000
+++ b/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 09:49:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitops.h,v 1.14 2021/12/19 09:44:27 riastradh Exp $    */
+/*     $NetBSD: bitops.h,v 1.15 2021/12/19 09:49:47 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -106,8 +106,9 @@
 #define        BITS_TO_LONGS(n)                                                \
        roundup2((n), (sizeof(unsigned long) * CHAR_BIT))
 
-#define        BITS_PER_BYTE   NBBY
-#define        BITS_PER_LONG   (__SIZEOF_LONG__ * CHAR_BIT)
+#define        BITS_PER_TYPE(type)     (sizeof(type) * NBBY)
+#define        BITS_PER_BYTE           NBBY
+#define        BITS_PER_LONG           (__SIZEOF_LONG__ * CHAR_BIT)
 
 #define        BIT(n)          ((unsigned long)__BIT(n))
 #define        BIT_ULL(n)      ((unsigned long long)__BIT(n))



Home | Main Index | Thread Index | Old Index