Page MenuHomeFreeBSD

poll: Unify userspace pollfd pointer name
ClosedPublic

Authored by cem on Oct 23 2018, 5:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 26, 10:47 PM
Unknown Object (File)
Fri, Sep 26, 10:06 AM
Unknown Object (File)
Wed, Sep 17, 7:33 AM
Unknown Object (File)
Tue, Sep 16, 8:18 AM
Unknown Object (File)
Sep 16 2025, 2:14 AM
Unknown Object (File)
Sep 15 2025, 11:02 PM
Unknown Object (File)
Sep 15 2025, 7:30 PM
Unknown Object (File)
Sep 15 2025, 12:26 PM
Subscribers

Details

Summary

Some of the poll code used 'fds' and some used 'ufds' to refer to the
uap->fds userspace pointer that was passed around to subroutines. Some of
the poll code used 'fds' to refer to the kernel memory pollfd arrays, which
seemed unnecessarily confusing.

Unify on 'ufds' to refer to the userspace pollfd array.

Additionally, 'bits' is not an accurate description of the kernel pollfd
array in kern_poll, so rename that to 'kfds'. Finally, clean up some logic
with mallocarray() and nitems().

No functional change.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable