freebsd_network: Remove definitions of ffs/fls functions from x86/cpufunc.h
This commit is contained in:
@@ -161,50 +161,6 @@ sfence(void)
|
||||
__asm __volatile("sfence" : : : "memory");
|
||||
}
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifndef __HAIKU__
|
||||
#define HAVE_INLINE_FFS
|
||||
|
||||
static __inline int
|
||||
ffs(int mask)
|
||||
{
|
||||
/*
|
||||
* Note that gcc-2's builtin ffs would be used if we didn't declare
|
||||
* this inline or turn off the builtin. The builtin is faster but
|
||||
* broken in gcc-2.4.5 and slower but working in gcc-2.5 and later
|
||||
* versions.
|
||||
*/
|
||||
return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HAVE_INLINE_FFSL
|
||||
|
||||
static __inline int
|
||||
ffsl(long mask)
|
||||
{
|
||||
return (ffs((int)mask));
|
||||
}
|
||||
|
||||
#define HAVE_INLINE_FLS
|
||||
|
||||
static __inline int
|
||||
fls(int mask)
|
||||
{
|
||||
return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1);
|
||||
}
|
||||
|
||||
#define HAVE_INLINE_FLSL
|
||||
|
||||
static __inline int
|
||||
flsl(long mask)
|
||||
{
|
||||
return (fls((int)mask));
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
static __inline void
|
||||
halt(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user