@@ -1,6 +1,9 @@
|
||||
ebusd - ChangeLog
|
||||
-----------------
|
||||
|
||||
2014-10-21 Roland Jax <roland.jax@liwest.at>
|
||||
* class EBusLoop: recvBuffer removed.
|
||||
|
||||
2014-10-09 Roland Jax <roland.jax@liwest.at>
|
||||
* class BaseLoop, EBusLoop: polling functionality implemented.
|
||||
* Version changed from 0.3.0 to 0.4.0
|
||||
|
||||
@@ -31,6 +31,7 @@ Dependency
|
||||
----------
|
||||
* libebus (https://github.com/yuhu-/libebus)
|
||||
* glibc
|
||||
* pkgconfig
|
||||
|
||||
|
||||
Build
|
||||
|
||||
+5
-5
@@ -30,13 +30,13 @@ public:
|
||||
WQueue()
|
||||
{
|
||||
pthread_mutex_init(&m_mutex, NULL);
|
||||
pthread_cond_init(&m_condv, NULL);
|
||||
pthread_cond_init(&m_cond, NULL);
|
||||
}
|
||||
|
||||
~WQueue()
|
||||
{
|
||||
pthread_mutex_destroy(&m_mutex);
|
||||
pthread_cond_destroy(&m_condv);
|
||||
pthread_cond_destroy(&m_cond);
|
||||
}
|
||||
|
||||
void add(T item)
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
m_queue.push_back(item);
|
||||
|
||||
pthread_cond_signal(&m_condv);
|
||||
pthread_cond_signal(&m_cond);
|
||||
pthread_mutex_unlock(&m_mutex);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
pthread_mutex_lock(&m_mutex);
|
||||
|
||||
while (m_queue.size() == 0)
|
||||
pthread_cond_wait(&m_condv, &m_mutex);
|
||||
pthread_cond_wait(&m_cond, &m_mutex);
|
||||
|
||||
T item = m_queue.front();
|
||||
m_queue.pop_front();
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
private:
|
||||
std::list<T> m_queue;
|
||||
pthread_mutex_t m_mutex;
|
||||
pthread_cond_t m_condv;
|
||||
pthread_cond_t m_cond;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user