opnsense-src/sys/compat
Doug Moore b0056b31e9 libkern: add ilog2 macro
The kernel source contains several definitions of an ilog2 function;
some are slower than necessary, and one of them is incorrect.
Elimininate them all and define an ilog2 macro in libkern to replace
them, in a way that is fast, correct for all argument types, and, in a
GENERIC kernel, includes a check for an invalid zero parameter.

Folks at Microsoft have verified that having a correct ilog2
definition for their MANA driver doesn't break it.

Reviewed by:	alc, markj, mhorne (older version), jhibbits (older version)
Differential Revision:	https://reviews.freebsd.org/D45170
Differential Revision:	https://reviews.freebsd.org/D45235
2024-06-03 11:37:55 -05:00
..
freebsd32 Regen 2024-05-21 22:03:20 +02:00
ia32 freebsd32: struct siginfo32 -> struct __siginfo32 2024-03-19 23:13:26 +00:00
lindebugfs uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-05-10 13:43:36 -07:00
linprocfs linprocfs: Add support for proc/sys/fs/mqueue/* 2024-05-23 13:40:45 -06:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux Redefine CLOCK_BOOTTIME to alias CLOCK_MONOTONIC, not CLOCK_UPTIME 2024-05-31 08:45:02 -06:00
linuxkpi libkern: add ilog2 macro 2024-06-03 11:37:55 -05:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00