Skip to content

Commit

Permalink
Rollup merge of #125800 - fortanix:raoul/rte-99-fix_mut_static_task_q…
Browse files Browse the repository at this point in the history
…ueue, r=jethrogb

Fix `mut` static task queue in SGX target

[PR 125046](rust-lang/rust#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``
  • Loading branch information
matthiaskrgr authored Jun 5, 2024
2 parents e93683d + 33a1415 commit 6a35cd8
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 6a35cd8

Please sign in to comment.