summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-11-04 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-11-04 18:00:00 +0100
commit6e1fd835558b4e70ad94a280a209f050ec0f7a75 (patch)
treec7807d423152fecf6e7fd98aaa6fb69324238431 /thread.c
parent8465398c6d2a57bc30a07fb61353a7c8ba6db574 (diff)
downloadvdr-patch-lnbsharing-6e1fd835558b4e70ad94a280a209f050ec0f7a75.tar.gz
vdr-patch-lnbsharing-6e1fd835558b4e70ad94a280a209f050ec0f7a75.tar.bz2
Version 0.98vdr-0.98
- Completed storing the current audio volume in the setup.conf file (thanks to Andy Grobb). - Fixed closing the progress display with the "Back" key when in trick mode and Setup.ShowReplayMode is enabled (thanks to Stefan Huelswitt). - New SVDRP commands LSTR and DELR to list and delete recordings (thanks to Thomas Heiligenmann). - Fixed a crash when pressing the '2' button while replaying a DVD. - Updated 'channels.conf' for the "Bundesliga" channels of Premiere World (thanks to Mel Schächner). - Changed the tuning code to use FrontendInfo to detect the type of DVB card. - Removed the recursion stuff from cThread (cMutex already does this). - Fixed handling the repeat function in the channel display. - Avoiding multiple EPG entries for the same event (thanks to Rolf Hakenes for some valuable information on how to do this). - A recording on the primary interface can now be stopped to make it continue on an other free DVB card (if one is free at the moment). See MANUAL for details. - Added some missing teletext PIDs (thanks to Norbert Schmidt). - Added PTS to the converted PCM audio when replaying a DVD (thanks to Andreas Schultz). Now the audio and video of a DVD replayed over the DVB card's A/V out should always be in sync. - Fixed handling the "Power" key in case Setup.MinUserInactivity is set to 0 to disable automatic shutdown. - Added a fifth parameter to the 'shutdown' call that indicates the reason for this shutdown request (see INSTALL). - Fixed releasing 'index' memory after recording or playback. - Fixed ejecting a DVD while it is being replayed. - Removed all video overlay stuff from cDvbApi and SVDRP. Guido Fiala's new 'kvdr' version 0.4 now does these things itself. As a consequence of this you will now need to use kvdr 0.4 or later. - The device /dev/video is now opened only if necessary (to GRAB an image), allowing other programs (like 'kvdr', for instance) to use that device.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/thread.c b/thread.c
index b51489e..7e5b0ea 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.15 2001/10/21 12:25:31 kls Exp $
+ * $Id: thread.c 1.16 2001/10/27 13:23:06 kls Exp $
*/
#include "thread.h"
@@ -99,8 +99,7 @@ cThread::cThread(void)
signalHandlerInstalled = true;
}
running = false;
- parentPid = threadPid = lockingPid = 0;
- locked = 0;
+ parentPid = threadPid = 0;
}
cThread::~cThread()
@@ -159,24 +158,6 @@ void cThread::Cancel(int WaitSeconds)
pthread_cancel(thread);
}
-bool cThread::Lock(void)
-{
- if (getpid() != lockingPid || !locked) {
- Mutex.Lock();
- lockingPid = getpid();
- }
- locked++;
- return true;
-}
-
-void cThread::Unlock(void)
-{
- if (!--locked) {
- lockingPid = 0;
- Mutex.Unlock();
- }
-}
-
void cThread::WakeUp(void)
{
kill(parentPid, SIGIO); // makes any waiting 'select()' call return immediately
@@ -228,17 +209,13 @@ bool cThreadLock::Lock(cThread *Thread)
{
if (Thread && !thread) {
thread = Thread;
- locked = Thread->Lock();
- return locked;
+ Thread->Lock();
+ locked = true;
+ return true;
}
return false;
}
-bool cThreadLock::Locked(void)
-{
- return locked;
-}
-
// --- cPipe -----------------------------------------------------------------
// cPipe::Open() and cPipe::Close() are based on code originally received from