aboutsummaryrefslogtreecommitdiff
path: root/lib/base
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2009-04-06 14:08:55 +0200
committerFelix Domke <tmbinc@elitedvb.net>2009-04-06 14:08:55 +0200
commit84007236ce796615a8e74432aad110164b23b8ec (patch)
tree5053dc936f63882afe3fec56342e9d5d1dc8fe76 /lib/base
parent3e45b153a93894c4c382d3ba5ded974c738e9589 (diff)
downloadenigma2-84007236ce796615a8e74432aad110164b23b8ec.tar.gz
enigma2-84007236ce796615a8e74432aad110164b23b8ec.zip
replace assert by ASSERT, so a proper log message is generated
Diffstat (limited to 'lib/base')
-rw-r--r--lib/base/thread.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/base/thread.cpp b/lib/base/thread.cpp
index 9878856e..db6deb35 100644
--- a/lib/base/thread.cpp
+++ b/lib/base/thread.cpp
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <unistd.h>
-#include <assert.h>
#include <lib/base/eerror.h>
void eThread::thread_completed(void *ptr)
@@ -14,7 +13,7 @@ void eThread::thread_completed(void *ptr)
if (!p->m_state.value())
{
p->m_state.up();
- assert(p->m_state.value() == 1);
+ ASSERT(p->m_state.value() == 1);
}
p->thread_finished();
@@ -43,8 +42,8 @@ int eThread::runAsync(int prio, int policy)
return -1;
eDebug("after: %d", m_state.value());
- assert(m_state.value() == 1); /* sync postconditions */
- assert(!m_alive);
+ ASSERT(m_state.value() == 1); /* sync postconditions */
+ ASSERT(!m_alive);
m_state.down();
m_alive = 1;
@@ -91,7 +90,7 @@ int eThread::sync(void)
int res;
m_state.down(); /* this might block */
res = m_alive;
- assert(m_state.value() == 0);
+ ASSERT(m_state.value() == 0);
m_state.up();
return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
}
@@ -121,6 +120,6 @@ void eThread::kill(bool sendcancel)
void eThread::hasStarted()
{
- assert(!m_state.value());
+ ASSERT(!m_state.value());
m_state.up();
}