summaryrefslogtreecommitdiff
path: root/runtime/thread.h
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2017-06-29 11:59:50 -0700
committer Alex Light <allight@google.com> 2017-06-30 14:24:56 +0000
commit46f9340f2a055a8fdfebbfbb739c697c20d83e7c (patch)
treeacb172f74723e4ea9ac7ded73b94c661217ec90d /runtime/thread.h
parentfe9a4f061841a3c597aac6817a47c799c54fcad7 (diff)
Add SuspendReason enum and change Suspension functions.
More self-documenting and more type safe. Bug: 62821960 Test: ./test.py Change-Id: Ic7a1ae6a25e687d65f5aa10c1aad54a7b80dd086
Diffstat (limited to 'runtime/thread.h')
-rw-r--r--runtime/thread.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index 770173e47e..e785ddc803 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -40,6 +40,7 @@
#include "managed_stack.h"
#include "offsets.h"
#include "runtime_stats.h"
+#include "suspend_reason.h"
#include "thread_state.h"
class BacktraceMap;
@@ -244,7 +245,7 @@ class Thread {
bool ModifySuspendCount(Thread* self,
int delta,
AtomicInteger* suspend_barrier,
- bool for_debugger)
+ SuspendReason reason)
WARN_UNUSED
REQUIRES(Locks::thread_suspend_count_lock_);
@@ -1300,7 +1301,7 @@ class Thread {
bool ModifySuspendCountInternal(Thread* self,
int delta,
AtomicInteger* suspend_barrier,
- bool for_debugger)
+ SuspendReason reason)
WARN_UNUSED
REQUIRES(Locks::thread_suspend_count_lock_);