summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-11-18 13:57:32 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-11-18 13:57:32 +0100
commit6439a8e169167e116efd9630564b5629efcd657b (patch)
tree93cfaaccc5fcad64a4e9f0d63ef8094f347f6274 /thread.c
parent5e272f90653736e6bc115660fa39cbe6d2ab0403 (diff)
downloadvdr-6439a8e169167e116efd9630564b5629efcd657b.tar.gz
vdr-6439a8e169167e116efd9630564b5629efcd657b.tar.bz2
All cards write EIT info into the same data structure; free cards scan for EIT info
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/thread.c b/thread.c
index b124581f..67b5ab96 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.3 2000/10/28 15:26:02 kls Exp $
+ * $Id: thread.c 1.4 2000/11/14 18:38:25 kls Exp $
*/
#include "thread.h"
@@ -24,7 +24,6 @@ cThread::cThread(void)
signal(SIGIO, SignalHandler);
signalHandlerInstalled = true;
}
- pthread_mutex_init(&mutex, NULL);
running = false;
parentPid = lockingPid = 0;
locked = 0;
@@ -32,7 +31,6 @@ cThread::cThread(void)
cThread::~cThread()
{
- pthread_mutex_destroy(&mutex);
}
void cThread::SignalHandler(int signum)
@@ -64,7 +62,7 @@ void cThread::Stop(void)
bool cThread::Lock(void)
{
if (!lockingPid || lockingPid != getpid()) {
- pthread_mutex_lock(&mutex);
+ Mutex.Lock();
lockingPid = getpid();
}
locked++;
@@ -75,7 +73,7 @@ void cThread::Unlock(void)
{
if (!--locked) {
lockingPid = 0;
- pthread_mutex_unlock(&mutex);
+ Mutex.Unlock();
}
}