summaryrefslogtreecommitdiff
path: root/runtime/gc/task_processor.h
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2023-12-19 18:48:15 +0000
committer Hans Boehm <hboehm@google.com> 2023-12-19 20:32:27 +0000
commit8bc6a58df7046b4d6f4b51eb274c7e60fea396ff (patch)
treeac6aa639279f5cf2048cb147a91cbea98c8088a4 /runtime/gc/task_processor.h
parentee7471ec0a7aba338c3ac90de0f2ef0be9a35fed (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/gc/task_processor.h')
-rw-r--r--runtime/gc/task_processor.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/gc/task_processor.h b/runtime/gc/task_processor.h
index b9e6938b09..86e36ab6d6 100644
--- a/runtime/gc/task_processor.h
+++ b/runtime/gc/task_processor.h
@@ -64,15 +64,9 @@ class TaskProcessor {
bool IsRunning() const REQUIRES(!lock_);
void UpdateTargetRunTime(Thread* self, HeapTask* target_time, uint64_t new_target_time)
REQUIRES(!lock_);
- // Is the given thread the task processor thread?
- // If wait is true, and no thread has been registered via Start(), we briefly
- // wait for one to be registered. If we time out, we return true.
- bool IsRunningThread(Thread* t, bool wait = false) REQUIRES(!lock_);
+ Thread* GetRunningThread() const REQUIRES(!lock_);
private:
- // Wait briefly for running_thread_ to become non-null. Return false on timeout.
- bool WaitForThread(Thread* self) REQUIRES(lock_);
-
class CompareByTargetRunTime {
public:
bool operator()(const HeapTask* a, const HeapTask* b) const {