summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-09-23 14:19:39 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-09-23 14:19:39 +0200
commit34e6eaad5834f9ec459ef4b925c79d00b0f4899d (patch)
tree0b52482e422f4dc5bc6d2e0ec7272e37a2c0cd19
parentf412897373b05ea78df93b56ab9d97c4bb522801 (diff)
downloadvdr-34e6eaad5834f9ec459ef4b925c79d00b0f4899d.tar.gz
vdr-34e6eaad5834f9ec459ef4b925c79d00b0f4899d.tar.bz2
Fixed setting the locking PID in cMutex
-rw-r--r--HISTORY2
-rw-r--r--thread.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index e4b6370d..b4265046 100644
--- a/HISTORY
+++ b/HISTORY
@@ -759,7 +759,7 @@ Video Disk Recorder Revision History
audio output volume.
- New version of the 'epg2timers' tool (thanks to Carsten Koch).
-2001-09-21: Version 0.96
+2001-09-23: Version 0.96
- Made VDR compile with libdvdread-0.9.1 (thanks to Andreas Schultz).
Note that you now _need_ version 0.9.1 of libdvdread to compile VDR with
diff --git a/thread.c b/thread.c
index ec66440e..f4ba76a1 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.12 2001/09/15 13:00:58 kls Exp $
+ * $Id: thread.c 1.13 2001/09/23 14:04:35 kls Exp $
*/
#include "thread.h"
@@ -67,16 +67,19 @@ cMutex::~cMutex()
void cMutex::Lock(void)
{
- if (getpid() != lockingPid || !locked)
+ if (getpid() != lockingPid || !locked) {
pthread_mutex_lock(&mutex);
- lockingPid = getpid();
+ lockingPid = getpid();
+ }
locked++;
}
void cMutex::Unlock(void)
{
- if (!--locked)
+ if (!--locked) {
+ lockingPid = 0;
pthread_mutex_unlock(&mutex);
+ }
}
// --- cThread ---------------------------------------------------------------