about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-05 09:10:09 +0000
committerbors <bors@rust-lang.org>2024-09-05 09:10:09 +0000
commit18d358c63c7ae8ff9d921f3464707bedb23254d2 (patch)
tree749f9ffd4c2ac97ad51d9919f95d4ebb963f21fc /compiler/rustc_codegen_llvm/src
parent989f63bc531d3b6932125a12bd1e48b3ba343185 (diff)
parent5f22103395c513a5dffcbe7c10b207900ce61967 (diff)
downloadrust-18d358c63c7ae8ff9d921f3464707bedb23254d2.tar.gz
rust-18d358c63c7ae8ff9d921f3464707bedb23254d2.zip
Auto merge of #3784 - Mandragorian:detect_moved_mutexes, r=RalfJung
Detect when pthread_mutex_t is moved

What I am not sure about this PR is how to support storing the additional mutex data like its address and kind. If I understand correctly the `concurrency::sync::Mutex` struct is to be used by any mutex implementation. This possibly means that different implementation might want to store different data in the mutex. So any additional data should be implementation defined somehow. Solutions that come to mind:

- Store the additional data as `Box<dyn Any>` and the implementations can downcast their data when they fetch them.
- Have each shim implementation define a `static mut` map between `MutexID`s and the additional data.

Let me know

Fixes #3749
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions