OSDN Git Service

Revert "Use try lock to fix class resolution race"
[android-x86/art.git] / runtime / monitor.h
index 1d829e1..7b4b8f9 100644 (file)
@@ -62,7 +62,7 @@ class Monitor {
       NO_THREAD_SAFETY_ANALYSIS;  // TODO: Reading lock owner without holding lock is racy.
 
   // NO_THREAD_SAFETY_ANALYSIS for mon->Lock.
-  static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj, bool trylock)
+  static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj)
       EXCLUSIVE_LOCK_FUNCTION(obj)
       NO_THREAD_SAFETY_ANALYSIS
       REQUIRES(!Roles::uninterruptible_)
@@ -193,15 +193,6 @@ class Monitor {
                !monitor_lock_)
       SHARED_REQUIRES(Locks::mutator_lock_);
 
-  // Try to lock without blocking, returns true if we acquired the lock.
-  bool TryLock(Thread* self)
-      REQUIRES(!monitor_lock_)
-      SHARED_REQUIRES(Locks::mutator_lock_);
-  // Variant for already holding the monitor lock.
-  bool TryLockLocked(Thread* self)
-      REQUIRES(monitor_lock_)
-      SHARED_REQUIRES(Locks::mutator_lock_);
-
   void Lock(Thread* self)
       REQUIRES(!monitor_lock_)
       SHARED_REQUIRES(Locks::mutator_lock_);