Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::SafepointReadRwLocker Class Reference

#include <lockers.h>

Inheritance diagram for dart::SafepointReadRwLocker:
dart::StackResource

Public Member Functions

 SafepointReadRwLocker (ThreadState *thread_state, SafepointRwLock *rw_lock)
 
 ~SafepointReadRwLocker ()
 
- Public Member Functions inherited from dart::StackResource
 StackResource (ThreadState *thread)
 
virtual ~StackResource ()
 
ThreadStatethread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::StackResource
static void Unwind (ThreadState *thread)
 
static void UnwindAbove (ThreadState *thread, StackResource *new_top)
 

Detailed Description

Definition at line 419 of file lockers.h.

Constructor & Destructor Documentation

◆ SafepointReadRwLocker()

dart::SafepointReadRwLocker::SafepointReadRwLocker ( ThreadState thread_state,
SafepointRwLock rw_lock 
)
inline

Definition at line 421 of file lockers.h.

422 : StackResource(thread_state), rw_lock_(rw_lock) {
423 ASSERT(rw_lock_ != nullptr);
424 if (!rw_lock_->EnterRead()) {
425 // if lock didn't have to be acquired, it doesn't have to be released.
426 rw_lock_ = nullptr;
427 }
428 }
StackResource(ThreadState *thread)
Definition: allocation.h:25
#define ASSERT(E)

◆ ~SafepointReadRwLocker()

dart::SafepointReadRwLocker::~SafepointReadRwLocker ( )
inline

Definition at line 429 of file lockers.h.

429 {
430 if (rw_lock_ != nullptr) {
431 rw_lock_->LeaveRead();
432 }
433 }

The documentation for this class was generated from the following file: