summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-02-24 10:01:31 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-24 10:01:31 -0800
commit6152bbc65016e526f25d24a66b92d6aa822f6ee0 (patch)
treec889b96609acef1ddde26a338e1b4a0e5a802074 /include/utils
parent7b76c8d3fc25aedea6edfed9638b008faa2f6ae8 (diff)
parentc2b3cda097d2f8ac9211360aa82995d693e0764c (diff)
downloadframeworks_base-6152bbc65016e526f25d24a66b92d6aa822f6ee0.zip
frameworks_base-6152bbc65016e526f25d24a66b92d6aa822f6ee0.tar.gz
frameworks_base-6152bbc65016e526f25d24a66b92d6aa822f6ee0.tar.bz2
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 1bcfaed..41e5766 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;