diff options
author | 2023-12-19 18:48:15 +0000 | |
---|---|---|
committer | 2023-12-19 20:32:27 +0000 | |
commit | 8bc6a58df7046b4d6f4b51eb274c7e60fea396ff (patch) | |
tree | ac6aa639279f5cf2048cb147a91cbea98c8088a4 /runtime/base/locks.h | |
parent | ee7471ec0a7aba338c3ac90de0f2ef0be9a35fed (diff) |
Revert^17 "Thread suspension cleanup and deadlock fix"
This reverts commit c6371b52df0da31acc174a3526274417b7aac0a7.
Reason for revert: This seems to have two remaining issues:
1. The second DCHECK in WaitForFlipFunction is not completely guaranteed to hold, resulting in failures for 658-fp-read-barrier.
2. WaitForSuspendBarrier seems to time out occasionally, possibly spuriously so. We fail when the futex times out once. That's probably incompatible with the app freezer. We should retry a few times.
Change-Id: Ibd8909b31083fc29e6d4f1fcde003d08eb16fc0a
Diffstat (limited to 'runtime/base/locks.h')
-rw-r--r-- | runtime/base/locks.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/base/locks.h b/runtime/base/locks.h index e8c83fe2b2..c15e5dee71 100644 --- a/runtime/base/locks.h +++ b/runtime/base/locks.h @@ -108,6 +108,10 @@ enum LockLevel : uint8_t { kClassLinkerClassesLock, // TODO rename. kSubtypeCheckLock, kBreakpointLock, + // This is a generic lock level for a lock meant to be gained after having a + // monitor lock. + kPostMonitorLock, + kMonitorLock, kMonitorListLock, kThreadListLock, kAllocTrackerLock, @@ -121,10 +125,7 @@ enum LockLevel : uint8_t { kRuntimeShutdownLock, kTraceLock, kHeapBitmapLock, - // This is a generic lock level for a lock meant to be gained after having a - // monitor lock. - kPostMonitorLock, - kMonitorLock, + // This is a generic lock level for a top-level lock meant to be gained after having the // mutator_lock_. kPostMutatorTopLockLevel, @@ -137,7 +138,7 @@ enum LockLevel : uint8_t { kUserCodeSuspensionLock, kZygoteCreationLock, - // The highest valid lock level. Use this for locks that should only be acquired with no + // The highest valid lock level. Use this if there is code that should only be called with no // other locks held. Since this is the highest lock level we also allow it to be held even if the // runtime or current thread is not fully set-up yet (for example during thread attach). Note that // this lock also has special behavior around the mutator_lock_. Since the mutator_lock_ is not |