diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | thread.c | 21 | ||||
-rw-r--r-- | thread.h | 5 |
3 files changed, 4 insertions, 24 deletions
@@ -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). @@ -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) @@ -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: |