Rollup merge of #141690 - Patrick-6:intercept-mutex, r=m-ou-se

Add `rustc_diagnostic_item` to `sys::Mutex` methods

For an ongoing project for adding a concurrency model checker to Miri we need to be able to intercept locking/unlocking operations on standard library mutexes.

This PR adds diagnostic items to the relevant calls `lock`, `try_lock` and `unlock` for the `sys::Mutex` implementation on the targets we care about.
This PR also makes the internals of `pthread::Mutex` less public, to reduce the chance of anyone locking/unlocking a mutex without going through the intercepted methods.

r? ``@RalfJung``
This commit is contained in:
Jacob Pratt
2025-05-29 04:49:47 +02:00
committed by GitHub
3 changed files with 16 additions and 1 deletions

View File

@@ -2074,6 +2074,9 @@ symbols! {
sym,
sync,
synthetic,
sys_mutex_lock,
sys_mutex_try_lock,
sys_mutex_unlock,
t32,
target,
target_abi,