Go to the documentation of this file.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef MIR_PROOF_OF_MUTEX_LOCK_H_
17#define MIR_PROOF_OF_MUTEX_LOCK_H_
32 if (!lock.owns_lock())
34 fatal_error("ProofOfMutexLock created with unlocked unique_lock");
A method can take an instance of this class by reference to require callers to hold a mutex lock,...
Definition proof_of_mutex_lock.h:27
ProofOfMutexLock operator=(ProofOfMutexLock const &)=delete
ProofOfMutexLock(std::lock_guard< std::mutex > const &)
Definition proof_of_mutex_lock.h:29
ProofOfMutexLock(std::unique_lock< std::mutex > const &lock)
Definition proof_of_mutex_lock.h:30
ProofOfMutexLock(ProofOfMutexLock const &)=delete
void(* fatal_error)(char const *reason,...)
fatal_error() is strictly for "this should never happen" situations that you cannot recover from.
Copyright © 2012-2025
Canonical Ltd.
Generated on Sun Mar 2 17:34:18 UTC 2025
This documentation is licensed under the GPL version 2 or 3.