summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/thread.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 2a27d21fca..16c7c1531d 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1709,7 +1709,9 @@ bool Thread::RequestSynchronousCheckpoint(Closure* function, ThreadState wait_st
IncrementSuspendCount(self, nullptr, &wrapped_barrier, SuspendReason::kInternal);
VerifyState();
DCHECK_GT(GetSuspendCount(), 0);
- DCHECK_EQ(self->GetSuspendCount(), 0);
+ if (wait_state != ThreadState::kRunnable) {
+ DCHECK_EQ(self->GetSuspendCount(), 0);
+ }
// Since we've incremented the suspend count, "this" thread can no longer disappear.
Locks::thread_list_lock_->ExclusiveUnlock(self);
if (IsSuspended()) {