Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176902004
D2839.1793594486.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1005 B
Referenced Files
None
Subscribers
None
D2839.1793594486.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 2, 4:41 AM (13 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41304318
Default Alt Text
D2839.1793594486.diff (1005 B)
Attached To
Mode
D2839: illums compat: use flsl/flsll for highbit/highbit64
Attached
Detach File
Event Timeline