Lines Matching defs:Mutex

50 // LockLevel is used to impose a lock hierarchy [1] where acquisition of a Mutex at a higher or
132 // Base class for all Mutex implementations
175 // Number of times the Mutex has been contended.
193 // A Mutex is used to achieve mutual exclusion between threads. A Mutex can be used to gain
194 // exclusive access to what it guards. A Mutex can be in one of two states:
203 // * Mutex is not reentrant and so an attempt to ExclusiveLock on the same thread will result in
205 std::ostream& operator<<(std::ostream& os, const Mutex& mu);
206 class LOCKABLE Mutex : public BaseMutex {
208 explicit Mutex(const char* name, LockLevel level = kDefaultMutexLevel, bool recursive = false);
209 ~Mutex();
225 // Is the current thread the exclusive holder of the Mutex.
228 // Assert that the Mutex is exclusively held by the current thread.
236 // Assert that the Mutex is not held by the current thread.
248 // Returns how many times this Mutex has been locked, it is better to use AssertHeld/NotHeld.
270 DISALLOW_COPY_AND_ASSIGN(Mutex);
273 // A ReaderWriterMutex is used to achieve mutual exclusion between threads, similar to a Mutex.
274 // Unlike a Mutex a ReaderWriterMutex can be used to gain exclusive (writer) or shared (reader)
275 // access to what it guards. A flaw in relation to a Mutex is that it cannot be used with a
392 explicit ConditionVariable(const char* name, Mutex& mutex);
408 // The Mutex being used by waiters. It is an error to mix condition variables between different
410 Mutex& guard_;
413 // their Mutex and another thread takes it and signals, the waiting thread observes that sequence_
426 // Scoped locker/unlocker for a regular Mutex that acquires mu upon construction and releases it
430 explicit MutexLock(Thread* self, Mutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) : self_(self), mu_(mu) {
440 Mutex& mu_;
496 static Mutex* instrument_entrypoints_lock_;
562 static Mutex* runtime_shutdown_lock_ ACQUIRED_AFTER(heap_bitmap_lock_);
565 static Mutex* profiler_lock_ ACQUIRED_AFTER(runtime_shutdown_lock_);
568 static Mutex* trace_lock_ ACQUIRED_AFTER(profiler_lock_);
571 static Mutex* alloc_tracker_lock_ ACQUIRED_AFTER(trace_lock_);
576 static Mutex* deoptimization_lock_ ACQUIRED_AFTER(alloc_tracker_lock_);
580 static Mutex* thread_list_lock_ ACQUIRED_AFTER(deoptimization_lock_);
586 static Mutex* jni_libraries_lock_ ACQUIRED_AFTER(thread_list_lock_);
594 // When declaring any Mutex add DEFAULT_MUTEX_ACQUIRED_AFTER to use annotalysis to check the code
595 // doesn't try to hold a higher level Mutex.
598 static Mutex* allocated_monitor_ids_lock_ ACQUIRED_AFTER(classlinker_classes_lock_);
601 static Mutex* allocated_thread_ids_lock_ ACQUIRED_AFTER(allocated_monitor_ids_lock_);
604 static Mutex* modify_ldt_lock_ ACQUIRED_AFTER(allocated_thread_ids_lock_);
607 static Mutex* intern_table_lock_ ACQUIRED_AFTER(modify_ldt_lock_);
610 static Mutex* reference_processor_lock_ ACQUIRED_AFTER(intern_table_lock_);
613 static Mutex* reference_queue_cleared_references_lock_ ACQUIRED_AFTER(reference_processor_lock_);
616 static Mutex* reference_queue_weak_references_lock_ ACQUIRED_AFTER(reference_queue_cleared_references_lock_);
619 static Mutex* reference_queue_finalizer_references_lock_ ACQUIRED_AFTER(reference_queue_weak_references_lock_);
622 static Mutex* reference_queue_phantom_references_lock_ ACQUIRED_AFTER(reference_queue_finalizer_references_lock_);
625 static Mutex* reference_queue_soft_references_lock_ ACQUIRED_AFTER(reference_queue_phantom_references_lock_);
628 static Mutex* abort_lock_ ACQUIRED_AFTER(reference_queue_soft_references_lock_);
632 static Mutex* thread_suspend_count_lock_ ACQUIRED_AFTER(abort_lock_);
635 static Mutex* unexpected_signal_lock_ ACQUIRED_AFTER(thread_suspend_count_lock_);
638 static Mutex* mem_maps_lock_ ACQUIRED_AFTER(unexpected_signal_lock_);
641 static Mutex* logging_lock_ ACQUIRED_AFTER(unexpected_signal_lock_);