diff options
author | Mathieu Chartier <mathieuc@google.com> | 2013-09-17 15:17:28 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2013-09-17 16:31:24 -0700 |
commit | 6aa3df965395566ed6a4fec4af37c2b7577992e9 (patch) | |
tree | c17406cf6cbea16165ad05130609450ff0e1e204 /runtime/monitor.h | |
parent | cb135ad769a5368f6ceb8caf25105a95580cbd6a (diff) | |
download | art-6aa3df965395566ed6a4fec4af37c2b7577992e9.zip art-6aa3df965395566ed6a4fec4af37c2b7577992e9.tar.gz art-6aa3df965395566ed6a4fec4af37c2b7577992e9.tar.bz2 |
Refactor system weak sweeping, add support for modification.
Required for moving collectors.
Change-Id: Ib97ba4a05af1139f8d388077a15e62bcb9534855
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r-- | runtime/monitor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h index 6651768..4249316 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -103,6 +103,7 @@ class Monitor { static bool IsValidLockWord(int32_t lock_word); mirror::Object* GetObject(); + void SetObject(mirror::Object* object); private: explicit Monitor(Thread* owner, mirror::Object* obj) @@ -159,7 +160,7 @@ class Monitor { int lock_count_ GUARDED_BY(monitor_lock_); // What object are we part of (for debugging). - mirror::Object* const obj_; + mirror::Object* obj_; // Threads currently waiting on this monitor. Thread* wait_set_ GUARDED_BY(monitor_lock_); @@ -183,8 +184,7 @@ class MonitorList { void Add(Monitor* m); - void SweepMonitorList(IsMarkedTester is_marked, void* arg) - SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_); + void SweepMonitorList(RootVisitor visitor, void* arg); private: Mutex monitor_list_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; |