diff options
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r-- | runtime/mirror/object.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h index 0ee46c3556..e174cbcadc 100644 --- a/runtime/mirror/object.h +++ b/runtime/mirror/object.h @@ -140,6 +140,11 @@ class MANAGED LOCKABLE Object { SHARED_REQUIRES(Locks::mutator_lock_); uint32_t GetLockOwnerThreadId(); + // Try to enter the monitor, returns non null if we succeeded. + mirror::Object* MonitorTryEnter(Thread* self) + EXCLUSIVE_LOCK_FUNCTION() + REQUIRES(!Roles::uninterruptible_) + SHARED_REQUIRES(Locks::mutator_lock_); mirror::Object* MonitorEnter(Thread* self) EXCLUSIVE_LOCK_FUNCTION() REQUIRES(!Roles::uninterruptible_) |