summaryrefslogtreecommitdiffstats
path: root/third_party/libjingle
diff options
context:
space:
mode:
authorzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 23:50:15 +0000
committerzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 23:50:15 +0000
commita36804546751df937333345b7a27b4ef8d60b67d (patch)
tree4edf8385dfad33ae16e341b2c253d8da429f0dfd /third_party/libjingle
parentb39bcf834c2563935890c89f73aea67aa1d50f58 (diff)
downloadchromium_src-a36804546751df937333345b7a27b4ef8d60b67d.zip
chromium_src-a36804546751df937333345b7a27b4ef8d60b67d.tar.gz
chromium_src-a36804546751df937333345b7a27b4ef8d60b67d.tar.bz2
Fix a naming collision in thread.h on a crit section that can cause a deadlock
BUG=none TEST=none Review URL: http://codereview.chromium.org/264026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libjingle')
-rw-r--r--third_party/libjingle/files/talk/base/thread.cc8
-rw-r--r--third_party/libjingle/files/talk/base/thread.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/third_party/libjingle/files/talk/base/thread.cc b/third_party/libjingle/files/talk/base/thread.cc
index 78db60d..760ddc1 100644
--- a/third_party/libjingle/files/talk/base/thread.cc
+++ b/third_party/libjingle/files/talk/base/thread.cc
@@ -126,13 +126,13 @@ void Thread::Start() {
param.sched_priority = 15; // +15 =
pthread_attr_setschedparam(&attr, &param);
}
- CritScope cs(&crit_);
+ CritScope cs(&started_crit_);
pthread_create(&thread_, &attr, PreRun, this);
started_ = true;
}
void Thread::Join() {
- CritScope cs(&crit_);
+ CritScope cs(&started_crit_);
if (started_) {
void *pv;
pthread_join(thread_, &pv);
@@ -173,7 +173,7 @@ void Thread::Start() {
if (priority_ != PRIORITY_NORMAL) {
flags = CREATE_SUSPENDED;
}
- CritScope cs(&crit_);
+ CritScope cs(&started_crit_);
thread_ = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)PreRun, this, flags, NULL);
if (thread_) {
if (priority_ != PRIORITY_NORMAL) {
@@ -187,7 +187,7 @@ void Thread::Start() {
}
void Thread::Join() {
- CritScope cs(&crit_);
+ CritScope cs(&started_crit_);
if (started_) {
WaitForSingleObject(thread_, INFINITE);
CloseHandle(thread_);
diff --git a/third_party/libjingle/files/talk/base/thread.h b/third_party/libjingle/files/talk/base/thread.h
index 367203a..0f305f0 100644
--- a/third_party/libjingle/files/talk/base/thread.h
+++ b/third_party/libjingle/files/talk/base/thread.h
@@ -133,7 +133,7 @@ private:
std::list<_SendMessage> sendlist_;
ThreadPriority priority_;
- CriticalSection crit_;
+ CriticalSection started_crit_;
bool started_;
bool has_sends_;