repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: created a separate reader thread and fixed the 'lock timeout' bug
[deb_libcec.git]
/
src
/
lib
/
util
/
threads.cpp
diff --git
a/src/lib/util/threads.cpp
b/src/lib/util/threads.cpp
index 3e40c2ba0370288cb668662514a91f52b3f10405..0e188c3fb71ff206e689bda4846fb273d8fef219 100644
(file)
--- a/
src/lib/util/threads.cpp
+++ b/
src/lib/util/threads.cpp
@@
-82,10
+82,21
@@
CLockObject::CLockObject(CMutex *mutex, int64_t iTimeout /* = -1 */) :
}
CLockObject::~CLockObject(void)
}
CLockObject::~CLockObject(void)
+{
+ Leave();
+ m_mutex = NULL;
+}
+
+void CLockObject::Leave(void)
{
m_mutex->Unlock();
m_bLocked = false;
{
m_mutex->Unlock();
m_bLocked = false;
- m_mutex = NULL;
+}
+
+void CLockObject::Lock(void)
+{
+ m_mutex->Lock();
+ m_bLocked = true;
}
CCondition::CCondition(void)
}
CCondition::CCondition(void)