summaryrefslogtreecommitdiff
path: root/include/utils
diff options
context:
space:
mode:
author Glenn Kasten <gkasten@google.com> 2011-02-24 10:01:31 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-02-24 10:01:31 -0800
commit3477a8cff2cf0eb5fcec03b0dc8ef9dcf64c0eb4 (patch)
tree0985bdcb179b8f5171e7401a3808879299aed247 /include/utils
parent99cdf2d9ba167ddf6ae996e6d9f9a2834bfa066b (diff)
parent7e453a51a5436c6c8c49c1e37cea5077bce09405 (diff)
Merge "Bug 3362814 Fix SMP race in access to mRequestExit"
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/threads.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 1bcfaede67..41e5766a04 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -527,9 +527,10 @@ private:
static int _threadLoop(void* user);
const bool mCanCallJava;
thread_id_t mThread;
- Mutex mLock;
+ mutable Mutex mLock;
Condition mThreadExitedCondition;
status_t mStatus;
+ // note that all accesses of mExitPending and mRunning need to hold mLock
volatile bool mExitPending;
volatile bool mRunning;
sp<Thread> mHoldSelf;