-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More cleanups cfgs in unix module #1813
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And make it not pub, but pub(crate). No functional changes.
Also makes the pub -> pub(crate) change. No functional changes.
Also here the change from pub to pub(crate) was made. No functional changes.
And rename it to WakerInternal where needed.
This is because we're going to use a similar list of cfg attributes to the list we use for selector, so it's beneficial to have them close together.
So we don't have to define it twice. Similar change as we made for the selector module.
To be used in the poll implementation.
Same as what we did for the selector. But for the waker it's a little more complicated due to the poll(2) implementation. That needs to wrap the Waker type to use it's internal waker, compared to kqueue and epoll which just reexport the Waker directly. This logical of what waker to use is now moved to the selector module. For kqueue and epoll it's a simple export, for poll it's a special type that call the internal waker. This special poll waker used to be the fdbased waker. All these changes (hopefully) add up to no changes at all. All the supported targets should continue to work with all configurations. However it should be easier to port to new targets without having to deal with the clusterfuck that was the old sys::unix::waker module.
Make that clear in the code.
@Darksonn hopefully this is the last of the cfg cleanups :) |
Darksonn
approved these changes
Jun 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to the changes made the cfgs for the selector this commit set is for the waker type.
The waker implementation are split into multiple files, one per implementation, matching the selector split. The mess in src/sys/unix/waker.rs is cleaned up and moved to src/sys/unix/mod.rs and src/sys/unix/selector/*.rs, see individual commits for more details.