diff options
Diffstat (limited to 'library/std/src/sys/sync/mutex/pthread.rs')
| -rw-r--r-- | library/std/src/sys/sync/mutex/pthread.rs | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/library/std/src/sys/sync/mutex/pthread.rs b/library/std/src/sys/sync/mutex/pthread.rs index 1d442248374..a7a3b47d0ec 100644 --- a/library/std/src/sys/sync/mutex/pthread.rs +++ b/library/std/src/sys/sync/mutex/pthread.rs @@ -28,6 +28,7 @@ impl Mutex { } #[inline] + // Make this a diagnostic item for Miri's concurrency model checker. #[cfg_attr(not(test), rustc_diagnostic_item = "sys_mutex_lock")] pub fn lock(&self) { // SAFETY: we call `init` above, therefore reentrant locking is safe. @@ -36,6 +37,7 @@ impl Mutex { } #[inline] + // Make this a diagnostic item for Miri's concurrency model checker. #[cfg_attr(not(test), rustc_diagnostic_item = "sys_mutex_unlock")] pub unsafe fn unlock(&self) { // SAFETY: the mutex can only be locked if it is already initialized @@ -44,6 +46,7 @@ impl Mutex { } #[inline] + // Make this a diagnostic item for Miri's concurrency model checker. #[cfg_attr(not(test), rustc_diagnostic_item = "sys_mutex_try_lock")] pub fn try_lock(&self) -> bool { // SAFETY: we call `init` above, therefore reentrant locking is safe. | 
