mirror of
https://github.com/opnsense/src.git
synced 2026-06-12 18:20:49 -04:00
netisr: avoid ffs(0)
A rearrangement to avoid computing ffs(0) saves 128 bytes in resulting amd64 object code. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D41254
This commit is contained in:
parent
1f7df75701
commit
1d897d19f3
1 changed files with 2 additions and 2 deletions
|
|
@ -968,8 +968,8 @@ swi_net(void *arg)
|
|||
nwsp->nws_flags |= NWS_RUNNING;
|
||||
nwsp->nws_flags &= ~NWS_SCHEDULED;
|
||||
while ((bits = nwsp->nws_pendingbits) != 0) {
|
||||
while ((prot = ffs(bits)) != 0) {
|
||||
prot--;
|
||||
while (bits != 0) {
|
||||
prot = ffs(bits) - 1;
|
||||
bits &= ~(1 << prot);
|
||||
(void)netisr_process_workstream_proto(nwsp, prot);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue