-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix mut
static task queue in SGX target
#125800
Fix mut
static task queue in SGX target
#125800
Conversation
This comment has been minimized.
This comment has been minimized.
1ae82d7
to
70f8310
Compare
I think in #125046 I should have only denied |
Right, but even then I don't see why Anyway, I believe this PR still cleans up the code. |
Yeah, seems preferable this way. |
70f8310
to
8db363c
Compare
@bors r- |
Waiting for @jethrogb's approval. |
hm in fact |
✌️ @jethrogb, you can now approve this pull request! If @workingjubilee told you to " |
@bors r+ |
…ic_task_queue, r=jethrogb Fix `mut` static task queue in SGX target [PR 125046](rust-lang#125046) prevents mutable references to statics with `#[linkage]`. Such a construct was used with the tests for the `x86_64-fortanix-unknown-sgx` target. This PR fixes this and cleans up code a bit in 5 steps. Each step passes CI: - The `mut` static is removed, and `Task` explicitly implements `Send` - Renaming of the `task_queue::lock` function - Pass function for `Thread` as `Send` to `Thread::imp` and update when `Packet<'scope, T>` implements `Sync` - Storing `Task::p` as a type that implements `Send` - Letting the compiler auto implement `Send` for `Task` cc: `@jethrogb`
…f, r=Urgau Allow static mut definitions with #[linkage] Unlike static declarations with #[linkage], for definitions rustc doesn't rewrite it to add an extra indirection. This was accidentally disallowed in rust-lang#125046. cc rust-lang#125800 (comment)
Rollup of 7 pull requests Successful merges: - rust-lang#125273 (bootstrap: implement new feature `bootstrap-self-test`) - rust-lang#125800 (Fix `mut` static task queue in SGX target) - rust-lang#125903 (rustc_span: Inline some hot functions) - rust-lang#125920 (Allow static mut definitions with #[linkage]) - rust-lang#125921 (coverage: Carve out hole spans in a separate early pass) - rust-lang#125995 (Use inline const blocks to create arrays of `MaybeUninit`.) - rust-lang#125996 (Closures are recursively reachable) r? `@ghost` `@rustbot` modify labels: rollup
…f, r=Urgau Allow static mut definitions with #[linkage] Unlike static declarations with #[linkage], for definitions rustc doesn't rewrite it to add an extra indirection. This was accidentally disallowed in rust-lang#125046. cc rust-lang#125800 (comment)
Rollup merge of rust-lang#125920 - bjorn3:allow_static_mut_linkage_def, r=Urgau Allow static mut definitions with #[linkage] Unlike static declarations with #[linkage], for definitions rustc doesn't rewrite it to add an extra indirection. This was accidentally disallowed in rust-lang#125046. cc rust-lang#125800 (comment)
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#124840 (resolve: mark it undetermined if single import is not has any bindings) - rust-lang#125622 (Winnow private method candidates instead of assuming any candidate of the right name will apply) - rust-lang#125648 (Remove unused(?) `~/rustsrc` folder from docker script) - rust-lang#125672 (Add more ABI test cases to miri (RFC 3391)) - rust-lang#125800 (Fix `mut` static task queue in SGX target) - rust-lang#125871 (Orphanck[old solver]: Consider opaque types to never cover type parameters) - rust-lang#125893 (Handle all GVN binops in a single place.) - rust-lang#126008 (Port `tests/run-make-fulldeps/issue-19371` to ui-fulldeps) - rust-lang#126032 (Update description of the `IsTerminal` example) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125800 - fortanix:raoul/rte-99-fix_mut_static_task_queue, r=jethrogb Fix `mut` static task queue in SGX target [PR 125046](rust-lang#125046) prevents mutable references to statics with `#[linkage]`. Such a construct was used with the tests for the `x86_64-fortanix-unknown-sgx` target. This PR fixes this and cleans up code a bit in 5 steps. Each step passes CI: - The `mut` static is removed, and `Task` explicitly implements `Send` - Renaming of the `task_queue::lock` function - Pass function for `Thread` as `Send` to `Thread::imp` and update when `Packet<'scope, T>` implements `Sync` - Storing `Task::p` as a type that implements `Send` - Letting the compiler auto implement `Send` for `Task` cc: ``@jethrogb``
bors sleepy @bors r- |
@fmease I'm confused about what you're trying to do. This PR is merged into master. |
Just maintenance. Sometimes @bors's queue gets out of sync with GitHub (e.g., containing already merged PRs). While I could press the "synchronize" button, it's a bit destructive and buggy (try-builds get upgraded to builds, failing PRs suddenly show up in the queue, etc.). Therefore it's typical for someone to swoop in and manually "sync" the queue by r-'ing already merged PRs which still show up in the queue. |
PR 125046 prevents mutable references to statics with
#[linkage]
. Such a construct was used with the tests for thex86_64-fortanix-unknown-sgx
target. This PR fixes this and cleans up code a bit in 5 steps. Each step passes CI:mut
static is removed, andTask
explicitly implementsSend
task_queue::lock
functionThread
asSend
toThread::imp
and update whenPacket<'scope, T>
implementsSync
Task::p
as a type that implementsSend
Send
forTask
cc: @jethrogb