diff options
author | 2014-06-03 00:04:17 +0000 | |
---|---|---|
committer | 2014-06-03 00:04:17 +0000 | |
commit | 0f821c00aeca7b6fca789e5613a91aef786b45af (patch) | |
tree | 6d8690b32e48239a0a11127f8c5b42cf0591a554 /runtime/mirror/class.cc | |
parent | 7a33c4b8260e2fafc9ca94e51334d4f18c8e4324 (diff) | |
parent | 03dbc04d1d5a3bd62801989b16e994a9ed0dafb5 (diff) |
Merge "Make class status volatile."
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 4869b454fe..4b02c0ff60 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -105,11 +105,11 @@ void Class::SetStatus(Status new_status, Thread* self) { self->SetException(gc_safe_throw_location, old_exception.Get()); } - CHECK(sizeof(Status) == sizeof(uint32_t)) << PrettyClass(this); + COMPILE_ASSERT(sizeof(Status) == sizeof(uint32_t), size_of_status_not_uint32); if (Runtime::Current()->IsActiveTransaction()) { - SetField32<true>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); + SetField32Volatile<true>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); } else { - SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); + SetField32Volatile<false>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); } // Classes that are being resolved or initialized need to notify waiters that the class status // changed. See ClassLinker::EnsureResolved and ClassLinker::WaitForInitializeClass. |