Add uninterruptible role
Example error:
cannot call function 'CopyOf' while mutex 'uninterruptible_' is held
TODO: Add annotation to more locations.
Bug: 20072211
Change-Id: I1bbf5a77e3deeafa5898df529cb7cb53a6d010d2
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index 8b541fd..eea9f37 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -112,7 +112,8 @@
ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
size_t SizeOf() SHARED_REQUIRES(Locks::mutator_lock_);
- Object* Clone(Thread* self) SHARED_REQUIRES(Locks::mutator_lock_);
+ Object* Clone(Thread* self) SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES(!Roles::uninterruptible_);
int32_t IdentityHashCode() const
SHARED_REQUIRES(Locks::mutator_lock_)