Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Implement hweig...



details:   https://anonhg.NetBSD.org/src/rev/a16e9d6f2f03
branches:  riastradh-drm2
changeset: 788425:a16e9d6f2f03
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 03:44:39 2013 +0000

description:
Implement hweight16 in <linux/bitops.h>.

diffstat:

 sys/external/bsd/drm2/include/linux/bitops.h |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 7ffa3a8bb1c1 -r a16e9d6f2f03 sys/external/bsd/drm2/include/linux/bitops.h
--- a/sys/external/bsd/drm2/include/linux/bitops.h      Wed Jul 24 03:44:24 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/bitops.h      Wed Jul 24 03:44:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitops.h,v 1.1.2.1 2013/07/24 00:33:12 riastradh Exp $ */
+/*     $NetBSD: bitops.h,v 1.1.2.2 2013/07/24 03:44:39 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,4 +32,12 @@
 #ifndef _LINUX_BITOPS_H_
 #define _LINUX_BITOPS_H_
 
+#include <lib/libkern/libkern.h>
+
+static inline unsigned int
+hweight16(uint16_t n)
+{
+       return popcount32(n);
+}
+
 #endif  /* _LINUX_BITOPS_H_ */



Home | Main Index | Thread Index | Old Index