Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 06:54:29 UTC 2018

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

Log Message:
Add hweight64.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 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.2 src/sys/external/bsd/common/include/linux/bitops.h:1.3
--- src/sys/external/bsd/common/include/linux/bitops.h:1.2	Mon Aug 27 06:17:17 2018
+++ src/sys/external/bsd/common/include/linux/bitops.h	Mon Aug 27 06:54:29 2018
@@ -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 @@ hweight32(uint32_t n)
 	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

Reply via email to