freebsd-nq/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
ddb
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
kern Add bit_count to the bitstring(3) api 2016-05-23 20:29:18 +00:00
kgssapi
libkern
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
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
netnatm
netpfil pf: Fix more ICMP mistranslation 2016-05-23 13:59:48 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
pc98
powerpc Fix the deciKelvin to Celsius conversion in kernel. 2016-05-22 13:58:32 +00:00
riscv
rpc
security
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
xen
Makefile