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)
Tue, Apr 16, 1:21 PM
Unknown Object (File)
Wed, Apr 10, 5:42 PM
Unknown Object (File)
Mar 7 2024, 11:31 PM
Unknown Object (File)
Feb 19 2024, 9:25 AM
Unknown Object (File)
Feb 19 2024, 9:25 AM
Unknown Object (File)
Feb 19 2024, 9:25 AM
Unknown Object (File)
Feb 19 2024, 9:25 AM
Unknown Object (File)
Dec 26 2023, 12:19 AM
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 39795
Build 36684: 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.