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 Move hweight8 next to ...
details: https://anonhg.NetBSD.org/src/rev/a7880f627ed5
branches: trunk
changeset: 992902:a7880f627ed5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 13:54:37 2018 +0000
description:
Move hweight8 next to its cousins.
diffstat:
sys/external/bsd/common/include/linux/bitops.h | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (34 lines):
diff -r d64b90190749 -r a7880f627ed5 sys/external/bsd/common/include/linux/bitops.h
--- a/sys/external/bsd/common/include/linux/bitops.h Mon Aug 27 13:54:25 2018 +0000
+++ b/sys/external/bsd/common/include/linux/bitops.h Mon Aug 27 13:54:37 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bitops.h,v 1.6 2018/08/27 07:16:50 riastradh Exp $ */
+/* $NetBSD: bitops.h,v 1.7 2018/08/27 13:54:37 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -73,6 +73,12 @@
}
static inline unsigned int
+hweight8(uint8_t w)
+{
+ return popcount(w & 0xff);
+}
+
+static inline unsigned int
hweight16(uint16_t n)
{
return popcount32(n);
@@ -257,11 +263,4 @@
(BIT) < (NBITS); \
(BIT) = find_next_bit((PTR), (NBITS), (BIT) + 1))
-static inline unsigned
-hweight8(unsigned w)
-{
-
- return popcount(w & 0xff);
-}
-
#endif /* _LINUX_BITOPS_H_ */
Home |
Main Index |
Thread Index |
Old Index