rust/library/std/src/thread
Matthias Krüger fcc0b641e9
Rollup merge of #125800 - fortanix:raoul/rte-99-fix_mut_static_task_queue, r=jethrogb
Fix `mut` static task queue in SGX target

[PR 125046](https://github.com/rust-lang/rust/pull/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``
2024-06-05 18:21:13 +02:00
..
local SeqCst->Relaxed in thread local test. 2024-03-20 15:38:09 +01:00
local.rs std: make TLS accessors closures that return pointers 2024-05-25 00:19:47 +02:00
mod.rs Pass function for Thread as Send to Thread::imp 2024-06-04 08:45:48 +02:00
scoped.rs Move rare overflow error to a cold function 2024-04-11 22:23:49 +01:00
tests.rs Use target_vendor = "apple" instead of target_os = "..." 2024-04-28 18:22:37 +02:00