repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: don't try to read or write in CUSBCECAdapterCommunication when the connection...
[deb_libcec.git]
/
src
/
lib
/
platform
/
threads
/
mutex.h
diff --git
a/src/lib/platform/threads/mutex.h
b/src/lib/platform/threads/mutex.h
index 2c2b5c569819a669353712c1968cfa14bab9cbae..d44c0f1953b532da1cfd81a22eaac01bf0fe4048 100644
(file)
--- a/
src/lib/platform/threads/mutex.h
+++ b/
src/lib/platform/threads/mutex.h
@@
-2,7
+2,7
@@
/*
* This file is part of the libCEC(R) library.
*
/*
* This file is part of the libCEC(R) library.
*
- * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is Copyright (C) 2011
-2012
Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
@@
-31,6
+31,14
@@
* http://www.pulse-eight.net/
*/
* http://www.pulse-eight.net/
*/
+#include "../os.h"
+
+#if defined(__WINDOWS__)
+#include "../windows/os-threads.h"
+#else
+#include "../posix/os-threads.h"
+#endif
+
namespace PLATFORM
{
class PreventCopy
namespace PLATFORM
{
class PreventCopy
@@
-158,30
+166,25
@@
namespace PLATFORM
class CCondition : public PreventCopy
{
public:
class CCondition : public PreventCopy
{
public:
- inline CCondition(void)
- {
- ConditionCreate(m_condition);
- }
-
+ inline CCondition(void) {}
inline ~CCondition(void)
{
inline ~CCondition(void)
{
- Broadcast();
- ConditionDelete(m_condition);
+ m_condition.Broadcast();
}
inline void Broadcast(void)
{
}
inline void Broadcast(void)
{
-
ConditionBroadcast(m_condition
);
+
m_condition.Broadcast(
);
}
inline void Signal(void)
{
}
inline void Signal(void)
{
-
ConditionSignal(m_condition
);
+
m_condition.Signal(
);
}
inline bool Wait(CMutex &mutex, uint32_t iTimeout = 0)
{
}
inline bool Wait(CMutex &mutex, uint32_t iTimeout = 0)
{
- return
ConditionWait(m_condition,
mutex.m_mutex, iTimeout);
+ return
m_condition.Wait(
mutex.m_mutex, iTimeout);
}
static void Sleep(uint32_t iTimeout)
}
static void Sleep(uint32_t iTimeout)
@@
-192,6
+195,7
@@
namespace PLATFORM
w.Wait(m, iTimeout);
}
w.Wait(m, iTimeout);
}
- condition_t m_condition;
+ private:
+ CConditionImpl m_condition;
};
}
};
}