-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Guarantee 8 bytes of alignment in Thread::into_raw #143859
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
Conversation
r? libs-api, this adds an alignment guarantee to the unstable |
This comment has been minimized.
This comment has been minimized.
ping @rust-lang/libs-api, as this provides a new guarantee, arguably needing FCP (and at a minimum team involvement) |
@rfcbot fcp merge |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r+ rollup |
Guarantee 8 bytes of alignment in Thread::into_raw When using `AtomicPtr` for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing that `Thread`'s `Inner` struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc. This guarantee is thus very useful and costs us nothing.
Guarantee 8 bytes of alignment in Thread::into_raw When using `AtomicPtr` for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing that `Thread`'s `Inner` struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc. This guarantee is thus very useful and costs us nothing.
Rollup of 9 pull requests Successful merges: - #140871 (Don't lint against named labels in `naked_asm!`) - #141663 (rustdoc: add ways of collapsing all impl blocks) - #143272 (Upgrade the `fortanix-sgx-abi` dependency) - #143585 (`loop_match`: suggest extracting to a `const` item) - #143698 (Fix unused_parens false positive) - #143859 (Guarantee 8 bytes of alignment in Thread::into_raw) - #144042 (Verify llvm-needs-components are not empty and match the --target value) - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc) - #144431 (Disable has_reliable_f128_math on musl targets) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - #140871 (Don't lint against named labels in `naked_asm!`) - #141663 (rustdoc: add ways of collapsing all impl blocks) - #143272 (Upgrade the `fortanix-sgx-abi` dependency) - #143585 (`loop_match`: suggest extracting to a `const` item) - #143698 (Fix unused_parens false positive) - #143859 (Guarantee 8 bytes of alignment in Thread::into_raw) - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc) - #144412 (Small cleanup: Use LocalKey<Cell> methods more) - #144431 (Disable has_reliable_f128_math on musl targets) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143859 - orlp:thread-into-raw-align, r=jhpratt Guarantee 8 bytes of alignment in Thread::into_raw When using `AtomicPtr` for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing that `Thread`'s `Inner` struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc. This guarantee is thus very useful and costs us nothing.
When using
AtomicPtr
for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing thatThread
'sInner
struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc.This guarantee is thus very useful and costs us nothing.