aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2015-06-17 17:16:06 +0000
committerAndriy Gapon <avg@FreeBSD.org>2015-06-17 17:16:06 +0000
commit783379a942bdf7833ddf4615f2d716661663dc8d (patch)
treec42b7aec27145977aa95bad8a357ac06d28181d1 /sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
parentd089f9b9155fd3b3fb160d866c6288e237d7520e (diff)
downloadsrc-783379a942bdf7833ddf4615f2d716661663dc8d.tar.gz
src-783379a942bdf7833ddf4615f2d716661663dc8d.zip
Revert r284511 because it caused build failures on many platforms
The problem is that when inline versions of flsl and flsll are not available, then libkern.h must be included for their declarations in kernel sources. The fix would be trivial, but I would like to figure out first if it even makes sense to use the libkern provided implementations. Reported by: bz Pointyhat to: avg
Notes
Notes: svn path=/head/; revision=284520
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h b/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
index f1adfd115d51..300351482c10 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
@@ -32,13 +32,6 @@
#include <sys/param.h>
#include <sys/isa_defs.h>
-#ifdef __FreeBSD__
-#ifdef _KERNEL
-#include <machine/cpufunc.h>
-#else
-#include <strings.h>
-#endif
-#endif
#ifdef __cplusplus
extern "C" {
@@ -389,9 +382,6 @@ extern unsigned char bcd_to_byte[256];
static __inline int
highbit(ulong_t i)
{
-#ifdef __FreeBSD__
- return (flsl(i));
-#else
register int h = 1;
if (i == 0)
@@ -417,7 +407,6 @@ highbit(ulong_t i)
h += 1;
}
return (h);
-#endif
}
/*
@@ -427,9 +416,6 @@ highbit(ulong_t i)
static __inline int
highbit64(uint64_t i)
{
-#ifdef __FreeBSD__
- return (flsll(i));
-#else
int h = 1;
if (i == 0)
@@ -453,7 +439,6 @@ highbit64(uint64_t i)
h += 1;
}
return (h);
-#endif
}
#ifdef __cplusplus