libCEC needs the following dependencies in order to work correctly:
* udev v151 or later
* cdc-acm support compiled into the kernel or available as module
+* liblockdev 1.0 or later
To compile libCEC on Linux, you'll need the following dependencies:
* autoconf 2.13 or later
* libtool
* udev development headers v151 or later
* gcc 4.2 or later
+* liblockdev 1.0 development headers
To compile, execute the following commands:
# autoreconf -vif
}
typedef pthread_t thread_t;
+ #define INVALID_THREAD_VALUE 0
#define ThreadsCreate(thread, func, arg) (pthread_create(&thread, NULL, (void *(*) (void *))func, (void *)arg) == 0)
#define ThreadsWait(thread, retval) (thread ? pthread_join(thread, retval) == 0 : true)
m_bStop(false),
m_bRunning(false),
m_bStopped(false),
- m_thread(NULL) {}
+ m_thread(INVALID_THREAD_VALUE) {}
virtual ~CThread(void)
{
StopThread(0);
void *retVal = NULL;
- if (m_thread)
+ if (m_thread != INVALID_THREAD_VALUE)
ThreadsWait(m_thread, &retVal);
}
namespace PLATFORM
{
#define thread_t HANDLE
+ #define INVALID_THREAD_VALUE INVALID_HANDLE
#define ThreadsWait(thread, retVal) (::WaitForSingleObject(thread, INFINITE) < 0)
#define ThreadsCreate(thread, func, arg) ((thread = ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, arg, 0, NULL)) == NULL ? false : true)