Home | History | Annotate | Download | only in common

Lines Matching defs:Mutex

10 // File:     mutex.h
12 // Lightweight C++ wrapper for umtx_ C mutex functions
31 // should instantiate a Mutex object while doing so. You should make your own
32 // private mutex where possible.
49 // Mutex mutex(&myMutex); // or no args for the global lock
51 // // When 'mutex' goes out of scope and gets destroyed here, the lock is released
54 // Note: Do NOT use the form 'Mutex mutex();' as that merely forward-declares a function
55 // returning a Mutex. This is a common mistake which silently slips through the
59 class U_COMMON_API Mutex : public UMemory {
61 inline Mutex(UMTX *mutex = NULL);
62 inline ~Mutex();
67 Mutex(const Mutex &other); // forbid copying of this class
68 Mutex &operator=(const Mutex &other); // forbid copying of this class
71 inline Mutex::Mutex(UMTX *mutex)
72 : fMutex(mutex)
77 inline Mutex::~Mutex()