1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Removed the (no longer necessary) 'panic' stuff from cThread

This commit is contained in:
Klaus Schmidinger 2003-05-03 14:08:28 +02:00
parent 3fc00d2211
commit 2cd7928fc6
4 changed files with 4 additions and 37 deletions

View File

@ -2103,3 +2103,4 @@ Video Disk Recorder Revision History
- Restoring the current channel in case a recording has switched the transponder.
If all devices are busy and none of them can provide the current channel, the
message "Channel not available!" will be displayed.
- Removed the (no longer necessary) 'panic' stuff from cThread.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 1.58 2003/05/02 12:24:04 kls Exp $
* $Id: dvbdevice.c 1.59 2003/05/03 14:03:20 kls Exp $
*/
#include "dvbdevice.h"
@ -671,16 +671,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
TurnOffLiveMode();
dvbTuner->Set(Channel, DoTune);
if (DoTune) {
/*XXX do we still need this???
if (!(status & FE_HAS_LOCK)) {
esyslog("ERROR: channel %d not locked on DVB card %d!", Channel->Number(), CardIndex() + 1);
if (LiveView && IsPrimaryDevice())
cThread::RaisePanic();
return false;
}
XXX*/
}
// PID settings:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: thread.c 1.23 2002/11/02 14:00:25 kls Exp $
* $Id: thread.c 1.24 2003/05/03 14:03:32 kls Exp $
*/
#include "thread.h"
@ -114,8 +114,6 @@ void cMutex::Unlock(void)
// The signal handler is necessary to be able to use SIGIO to wake up any
// pending 'select()' call.
time_t cThread::lastPanic = 0;
int cThread::panicLevel = 0;
bool cThread::signalHandlerInstalled = false;
bool cThread::emergencyExitRequested = false;
@ -191,25 +189,6 @@ void cThread::WakeUp(void)
kill(parentPid, SIGIO); // makes any waiting 'select()' call return immediately
}
#define MAXPANICLEVEL 10
void cThread::RaisePanic(void)
{
if (lastPanic > 0) {
if (time(NULL) - lastPanic < 5)
panicLevel++;
else if (panicLevel > 0)
panicLevel--;
}
lastPanic = time(NULL);
if (panicLevel > MAXPANICLEVEL) {
esyslog("ERROR: max. panic level exceeded");
EmergencyExit(true);
}
else
dsyslog("panic level: %d", panicLevel);
}
bool cThread::EmergencyExit(bool Request)
{
if (!Request)

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: thread.h 1.14 2002/08/15 11:40:06 kls Exp $
* $Id: thread.h 1.15 2003/05/03 14:03:36 kls Exp $
*/
#ifndef __THREAD_H
@ -48,8 +48,6 @@ private:
cMutex mutex;
pid_t parentPid, threadPid;
bool running;
static time_t lastPanic;
static int panicLevel;
static bool emergencyExitRequested;
static bool signalHandlerInstalled;
static void SignalHandler(int signum);
@ -65,7 +63,6 @@ public:
virtual ~cThread();
bool Start(void);
bool Active(void);
static void RaisePanic(void);
static bool EmergencyExit(bool Request = false);
};