#include <lockers.h>
Definition at line 47 of file lockers.h.
◆ MutexLocker()
dart::MutexLocker::MutexLocker |
( |
Mutex * |
mutex | ) |
|
|
inlineexplicit |
Definition at line 49 of file lockers.h.
50 :
51#if defined(DEBUG)
52 no_safepoint_scope_(true),
53#endif
54 mutex_(mutex) {
56#if defined(DEBUG)
58 if ((thread != nullptr) &&
60 thread->IncrementNoSafepointScopeDepth();
61 } else {
62 no_safepoint_scope_ = false;
63 }
64#endif
65 mutex_->Lock();
66 }
static Thread * Current()
◆ ~MutexLocker()
virtual dart::MutexLocker::~MutexLocker |
( |
| ) |
|
|
inlinevirtual |
Definition at line 68 of file lockers.h.
68 {
69 mutex_->Unlock();
70#if defined(DEBUG)
71 if (no_safepoint_scope_) {
73 }
74#endif
75 }
void DecrementNoSafepointScopeDepth()
◆ Lock()
void dart::MutexLocker::Lock |
( |
| ) |
const |
|
inline |
Definition at line 77 of file lockers.h.
77 {
78#if defined(DEBUG)
79 if (no_safepoint_scope_) {
81 }
82#endif
83 mutex_->Lock();
84 }
void IncrementNoSafepointScopeDepth()
◆ Unlock()
void dart::MutexLocker::Unlock |
( |
| ) |
const |
|
inline |
Definition at line 85 of file lockers.h.
85 {
86 mutex_->Unlock();
87#if defined(DEBUG)
88 if (no_safepoint_scope_) {
90 }
91#endif
92 }
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/vm/lockers.h