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/0a651cd9d087
branches: trunk
changeset: 992529:0a651cd9d087
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 b743fd765298 -r 0a651cd9d087 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