Fix comment about non-reentrant StaticMutex::lock().
The comment said it's UB to call lock() while it is locked. That'd be quite a useless Mutex. :) It was supposed to say 'locked by the same thread', not just 'locked'.
This commit is contained in:
parent
31e4087b90
commit
58756573fc
@ -28,8 +28,9 @@ impl StaticMutex {
|
||||
/// Calls raw_lock() and then returns an RAII guard to guarantee the mutex
|
||||
/// will be unlocked.
|
||||
///
|
||||
/// It is undefined behaviour to call this function while locked, or if the
|
||||
/// mutex has been moved since the last time this was called.
|
||||
/// It is undefined behaviour to call this function while locked by the
|
||||
/// same thread, or if the mutex has been moved since the last time this
|
||||
/// was called.
|
||||
#[inline]
|
||||
pub unsafe fn lock(&self) -> StaticMutexGuard<'_> {
|
||||
self.0.lock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user