summaryrefslogtreecommitdiff
path: root/lib/bitops.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 17:49:12 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 18:03:23 +0200
commitaf678af0d5c9ef3d8afdc0789b33dd0c40b6d6e5 (patch)
tree4d786cd3fecdbb370f1ceee5daecd3aa62fc205b /lib/bitops.h
parent286e2011d22ea6914d5f2db5de3f11911a1fb663 (diff)
parent8e433d6a529a883d566dc1d5a4afe0f1e2750baf (diff)
Merge remote-tracking branch 'origin/master' into int-new
Diffstat (limited to 'lib/bitops.h')
-rw-r--r--lib/bitops.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bitops.h b/lib/bitops.h
index 82bef699..9f954374 100644
--- a/lib/bitops.h
+++ b/lib/bitops.h
@@ -25,5 +25,6 @@ u32 u32_log2(u32 v);
static inline u32 u32_hash(u32 v) { return v * 2902958171u; }
-#endif
+static inline u8 u32_popcount(u32 v) { return __builtin_popcount(v); }
+#endif