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 hweight64.
details: https://anonhg.NetBSD.org/src/rev/0139c358196a
branches: trunk
changeset: 365830:0139c358196a
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 06:54:29 2018 +0000
description:
Add hweight64.
diffstat:
sys/external/bsd/common/include/linux/bitops.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 058fb67b50d2 -r 0139c358196a sys/external/bsd/common/include/linux/bitops.h
--- a/sys/external/bsd/common/include/linux/bitops.h Mon Aug 27 06:54:19 2018 +0000
+++ b/sys/external/bsd/common/include/linux/bitops.h Mon Aug 27 06:54:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bitops.h,v 1.2 2018/08/27 06:17:17 riastradh Exp $ */
+/* $NetBSD: bitops.h,v 1.3 2018/08/27 06:54:29 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -74,6 +74,12 @@
return popcount32(n);
}
+static inline unsigned int
+hweight64(uint64_t n)
+{
+ return popcount64(n);
+}
+
/*
* XXX Don't define BITS_PER_LONG as sizeof(unsigned long)*CHAR_BIT
* because that won't work in preprocessor conditionals, where it often
Home |
Main Index |
Thread Index |
Old Index