freebsd-dev/sys
Alan Somers 1b82e02f4d Add bit_count to the bitstring(3) api
Add a bit_count function, which efficiently counts the number of bits set in
a bitstring.

sys/sys/bitstring.h
tests/sys/sys/bitstring_test.c
share/man/man3/bitstring.3
	Add bit_alloc

sys/kern/subr_unit.c
	Use bit_count instead of a naive counting loop in check_unrhdr, used
	when INVARIANTS are enabled. The userland test runs about 6x faster
	in a generic build, or 8.5x faster when built for Nehalem, which has
	the POPCNT instruction.

sys/sys/param.h
	Bump __FreeBSD_version due to the addition of bit_alloc

UPDATING
	Add a note about the ABI incompatibility of the bitstring(3)
	changes, as suggested by lidl.

Suggested by:	gibbs
Reviewed by:	gibbs, ngie
MFC after:	9 days
X-MFC-With:	299090, 300538
Relnotes:	yes
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6255
2016-05-23 20:29:18 +00:00
..
amd64 Add macro to convert errno and use it when appropriate. 2016-05-22 12:46:34 +00:00
arm Spaces->tab in comment. 2016-05-23 20:13:17 +00:00
arm64 Extract the correct bits from the GICD_TYPER register. The interrupt count 2016-05-20 15:43:51 +00:00
boot Large improvements to efi-show (though some weird problems 2016-05-20 19:38:01 +00:00
bsm
cam Fix ada(4) trim support quirk setting. 2016-05-23 19:52:08 +00:00
cddl add vop_print methods to vnode operatios of various zfsctl node types 2016-05-18 13:21:29 +00:00
compat Implement "atomic_long_add_unless()" in the LinuxKPI and fix the 2016-05-23 16:19:51 +00:00
conf hyperv: Add helpers for busdma(9) operation 2016-05-23 06:35:11 +00:00
contrib Remove extraneous blank line. 2016-05-20 03:22:41 +00:00
crypto aesni(4): Initialize error before use 2016-04-20 03:05:32 +00:00
ddb Add a small set of logical operators to DDB command language. 2016-05-16 19:42:38 +00:00
dev ntb_hw(4): Only record the first three MSIX vectors 2016-05-23 19:46:58 +00:00
fs Remove drop/reacquire of Giant around geom calls for cd9660 and udf. 2016-05-22 18:16:25 +00:00
gdb
geom Remove unneeded Giant locking around kthreads creation. 2016-05-20 08:28:11 +00:00
gnu [bwn] convert another PHY-N workaround to the freebsd bwn format. 2016-05-23 04:17:27 +00:00
i386 Add macro to convert errno and use it when appropriate. 2016-05-22 12:46:34 +00:00
isa sys/isa: minor spelling fixes. 2016-05-03 21:51:52 +00:00
kern Add bit_count to the bitstring(3) api 2016-05-23 20:29:18 +00:00
kgssapi kgssapi: insignificant spelling fix. 2016-05-03 22:05:03 +00:00
libkern sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
mips Garbage collect unused prototype for clockintr(). 2016-05-20 15:34:03 +00:00
modules hyperv: Add helpers for busdma(9) operation 2016-05-23 06:35:11 +00:00
net sys/net: more spelling. 2016-05-19 16:28:05 +00:00
net80211 net80211: send RTM_IEEE80211_SCAN event when scan was cancelled. 2016-05-21 23:21:42 +00:00
netgraph sys/netgraph: spelling fixes in comments. 2016-04-29 21:25:05 +00:00
netinet Change net.inet.tcp.ecn.enable sysctl mib from a binary off/on 2016-05-19 22:20:35 +00:00
netinet6 Mark the prefix and default router list sysctl handlers MPSAFE. 2016-05-23 20:18:11 +00:00
netipsec netipsec: Fix minor style nit 2016-05-10 20:14:11 +00:00
netnatm kernel: use our nitems() macro when it is available through param.h. 2016-04-19 23:48:27 +00:00
netpfil pf: Fix more ICMP mistranslation 2016-05-23 13:59:48 +00:00
netsmb sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
nfs NFS: spelling fixes on comments. 2016-04-29 16:07:25 +00:00
nfsclient
nfsserver
nlm Remove slightly used const values that can be replaced with nitems(). 2016-04-21 15:38:28 +00:00
ofed Don't repeat the the word 'the' 2016-05-17 12:52:31 +00:00
opencrypto sys/opencrypto: minor spelling fixes. 2016-05-06 23:37:19 +00:00
pc98 Move 'device pci' for the PCI bus driver to the MI NOTES file. 2016-04-29 23:53:55 +00:00
powerpc Fix the deciKelvin to Celsius conversion in kernel. 2016-05-22 13:58:32 +00:00
riscv Eliminate an unused #include. For a brief period of time, _unrhdr.h was 2016-05-13 20:14:41 +00:00
rpc sys/rpc: minor spelling fixes. 2016-05-06 01:49:46 +00:00
security sys/security: minor spelling fixes. 2016-05-06 16:59:04 +00:00
sparc64 Add macro to convert errno and use it when appropriate. 2016-05-22 12:46:34 +00:00
sys Add bit_count to the bitstring(3) api 2016-05-23 20:29:18 +00:00
teken
tests
tools
ufs arc4random() returns 0 to (2**32)−1, use an alternative to initialize 2016-05-22 14:31:20 +00:00
vm Correct an error in a comment: One of the conditions for page allocation 2016-05-23 16:59:05 +00:00
x86 Implement support for RF_UNMAPPED and bus_map/unmap_resource on x86. 2016-05-20 18:00:10 +00:00
xdr RPC: for pointers replace 0 with NULL. 2016-04-14 17:06:37 +00:00
xen Don't repeat the the word 'the' 2016-05-17 12:52:31 +00:00
Makefile