Page MenuHomeFreeBSD

D2839.diff
No OneTemporary

D2839.diff

Index: head/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
===================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
@@ -32,6 +32,9 @@
#include <sys/param.h>
#include <sys/isa_defs.h>
+#if defined(__FreeBSD__) && defined(_KERNEL)
+#include <sys/libkern.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -382,6 +385,9 @@
static __inline int
highbit(ulong_t i)
{
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL)
+ return (flsl(i));
+#else
register int h = 1;
if (i == 0)
@@ -407,6 +413,7 @@
h += 1;
}
return (h);
+#endif
}
/*
@@ -416,6 +423,9 @@
static __inline int
highbit64(uint64_t i)
{
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSLL)
+ return (flsll(i));
+#else
int h = 1;
if (i == 0)
@@ -439,6 +449,7 @@
h += 1;
}
return (h);
+#endif
}
#ifdef __cplusplus

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 19, 11:19 AM (18 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31764959
Default Alt Text
D2839.diff (1005 B)

Event Timeline