Page MenuHomeFreeBSD

Split kern_poll() on two counterparts.
ClosedPublic

Authored by dchagin on Jun 8 2021, 6:35 AM.
Tags
None
Referenced Files
F109497980: D30690.diff
Wed, Feb 5, 8:36 PM
Unknown Object (File)
Fri, Jan 24, 8:36 PM
Unknown Object (File)
Fri, Jan 24, 7:17 PM
Unknown Object (File)
Fri, Jan 24, 7:09 PM
Unknown Object (File)
Sat, Jan 18, 5:14 PM
Unknown Object (File)
Sat, Jan 11, 4:23 AM
Unknown Object (File)
Thu, Jan 9, 9:32 PM
Unknown Object (File)
Dec 29 2024, 10:58 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 39808
Build 36697: 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
1575

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
1422

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.