Page MenuHomeFreeBSD

Split kern_poll() on two counterparts.
ClosedPublic

Authored by dchagin on Jun 8 2021, 6:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 3, 8:37 PM
Unknown Object (File)
May 12 2024, 8:06 PM
Unknown Object (File)
May 8 2024, 10:39 PM
Unknown Object (File)
May 8 2024, 10:35 PM
Unknown Object (File)
May 8 2024, 10:35 PM
Unknown Object (File)
May 8 2024, 10:35 PM
Unknown Object (File)
May 7 2024, 10:18 PM
Unknown Object (File)
May 5 2024, 9:28 PM
Subscribers

Details

Summary

The kern_poll() operates on clear kernel data, while the kern_poll_ufds()
operates on user supplied pollfd.
Move nfds check to kern_poll_maxfds().

No functional changes, it's for future use in the Linux emulation layer.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39787
Build 36676: arc lint + arc unit

Event Timeline

make kern_poll private, kern_poll_ufds - public
use kern_poll_ufds in freebsd32, linux

I believe it would be useful to add a comment above each of kern_poll_{u,k}fds, explaining that corresponding function expects from fds pointer.

sys/kern/sys_generic.c
1532

I would make kern_poll_maxfds() returning bool, and then just write

if (!kern_poll_maxfds(nfds))
    return (EINVAL);

I left the previous name for the kern_poll() to not break third-party modules

sys/kern/sys_generic.c
1424

I do not see much sense in the second sentence.

This revision is now accepted and ready to land.Jun 8 2021, 8:11 PM
This revision was automatically updated to reflect the committed changes.