Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Hello,

enami tsugutomo <tsugutomo.enami%jp.sony.com@localhost> wrote:
> 
> The test `if (selpoll)' is unnecessary if scanner function is passed
> directly instead of the flag.
> 
> -               error = selscan(l, (fd_mask *)(bits + ni * 0),
> -                   (fd_mask *)(bits + ni * 3), nd, retval);
> +               if (selpoll) {
> +                       error = selscan((char *)fds, nfds, retval);
> +               } else {
> +                       error = pollscan((struct pollfd *)fds, nfds,
> retval);
> +               }

You mean by function pointer?  I was considering it, but function pointers
are a bit slower.  Perhaps hardly matters, since we perform fo_poll()s, but
there is also a nasty pollsock()...

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index