Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137471837
D2839.id6285.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
990 B
Referenced Files
None
Subscribers
None
D2839.id6285.diff
View Options
Index: sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
===================================================================
--- sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
+++ 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 24, 7:03 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26070829
Default Alt Text
D2839.id6285.diff (990 B)
Attached To
Mode
D2839: illums compat: use flsl/flsll for highbit/highbit64
Attached
Detach File
Event Timeline
Log In to Comment