summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-24 09:53:12 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-24 09:53:12 +0200
commit73fde7480a71c1f92d26c333bad06d12dd5019be (patch)
tree5b6f790b7e3df1d7ff1986040ff76f50acf59b4e
parent343df6266eed68ef4d3f683e383e7237c0b75cdd (diff)
downloadvdr-73fde7480a71c1f92d26c333bad06d12dd5019be.tar.gz
vdr-73fde7480a71c1f92d26c333bad06d12dd5019be.tar.bz2
Removed the signal handler and WakeUp() call from cThread
-rw-r--r--HISTORY2
-rw-r--r--thread.c21
-rw-r--r--thread.h5
3 files changed, 4 insertions, 24 deletions
diff --git a/HISTORY b/HISTORY
index bd3e0a3d..c4668ff4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3063,3 +3063,5 @@ Video Disk Recorder Revision History
2 * IPACKS to avoid a buffer overflow in case a cTS2PES writes one complete
packet and then (within processing the same TS packet) wants to write another
small packet.
+- Removed the signal handler and WakeUp() call from cThread (it is no longer
+ needed).
diff --git a/thread.c b/thread.c
index 64b944b6..a646b3f1 100644
--- a/thread.c
+++ b/thread.c
@@ -4,13 +4,12 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.32 2004/10/15 13:15:02 kls Exp $
+ * $Id: thread.c 1.33 2004/10/24 09:47:57 kls Exp $
*/
#include "thread.h"
#include <errno.h>
#include <malloc.h>
-#include <signal.h>
#include <stdarg.h>
#include <sys/resource.h>
#include <sys/time.h>
@@ -186,18 +185,10 @@ void cMutex::Unlock(void)
// --- cThread ---------------------------------------------------------------
-// The signal handler is necessary to be able to use SIGIO to wake up any
-// pending 'select()' call.
-
-bool cThread::signalHandlerInstalled = false;
bool cThread::emergencyExitRequested = false;
cThread::cThread(const char *Description)
{
- if (!signalHandlerInstalled) {
- signal(SIGIO, SignalHandler);
- signalHandlerInstalled = true;
- }
running = false;
parentTid = childTid = 0;
description = NULL;
@@ -221,11 +212,6 @@ void cThread::SetDescription(const char *Description, ...)
}
}
-void cThread::SignalHandler(int signum)
-{
- signal(signum, SignalHandler);
-}
-
void *cThread::StartThread(cThread *Thread)
{
Thread->childTid = pthread_self();
@@ -289,11 +275,6 @@ void cThread::Cancel(int WaitSeconds)
pthread_cancel(childTid);
}
-void cThread::WakeUp(void)
-{
- pthread_kill(parentTid, SIGIO); // makes any waiting 'select()' call return immediately
-}
-
bool cThread::EmergencyExit(bool Request)
{
if (!Request)
diff --git a/thread.h b/thread.h
index 7d9254c0..d57f0b6b 100644
--- a/thread.h
+++ b/thread.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.h 1.21 2004/10/15 13:16:39 kls Exp $
+ * $Id: thread.h 1.22 2004/10/24 09:46:36 kls Exp $
*/
#ifndef __THREAD_H
@@ -74,13 +74,10 @@ private:
bool running;
char *description;
static bool emergencyExitRequested;
- static bool signalHandlerInstalled;
- static void SignalHandler(int signum);
static void *StartThread(cThread *Thread);
protected:
void Lock(void) { mutex.Lock(); }
void Unlock(void) { mutex.Unlock(); }
- void WakeUp(void);
virtual void Action(void) = 0;
void Cancel(int WaitSeconds = 0);
public: