repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
050df0f
)
cec: fix possible deadlock when starting a new thread
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Sat, 8 Oct 2011 15:34:23 +0000
(17:34 +0200)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Sat, 8 Oct 2011 15:34:23 +0000
(17:34 +0200)
src/lib/platform/threads.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/platform/threads.cpp
b/src/lib/platform/threads.cpp
index 31a0fb31571e4c3d49c6e077bf56d155b18d8748..8ba391920feb2695326b52ca6e7467f033771dd1 100644
(file)
--- a/
src/lib/platform/threads.cpp
+++ b/
src/lib/platform/threads.cpp
@@
-175,10
+175,17
@@
void *CThread::ThreadHandler(CThread *thread)
if (thread)
{
+ CLockObject lock(&thread->m_threadMutex);
thread->m_bRunning = true;
+ lock.Leave();
thread->m_threadCondition.Broadcast();
+
retVal = thread->Process();
+
+ lock.Lock();
thread->m_bRunning = false;
+ lock.Leave();
+ thread->m_threadCondition.Broadcast();
}
return retVal;