summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-02-23 13:55:57 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-02-23 13:55:57 +0100
commitdb7f6ee6192b395682685eb2151fb88354a786b5 (patch)
treedf5a99a045a073c9048cb1eab8b1d4b5eaf22c43 /thread.h
parent645f62fee44496cf4a982c8b7ef24c7a6a4ccc2e (diff)
downloadvdr-db7f6ee6192b395682685eb2151fb88354a786b5.tar.gz
vdr-db7f6ee6192b395682685eb2151fb88354a786b5.tar.bz2
Accessing Schedules data directly via cSIProcessor
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/thread.h b/thread.h
index 4547adde..3ac398a2 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.11 2001/10/27 13:22:20 kls Exp $
+ * $Id: thread.h 1.12 2002/02/23 13:53:38 kls Exp $
*/
#ifndef __THREAD_H
@@ -69,6 +69,22 @@ public:
static bool EmergencyExit(bool Request = false);
};
+// cMutexLock can be used to easily set a lock on mutex and make absolutely
+// sure that it will be unlocked when the block will be left. Several locks can
+// be stacked, so a function that makes many calls to another function which uses
+// cMutexLock may itself use a cMutexLock to make one longer lock instead of many
+// short ones.
+
+class cMutexLock {
+private:
+ cMutex *mutex;
+ bool locked;
+public:
+ cMutexLock(cMutex *Mutex = NULL);
+ ~cMutexLock();
+ bool Lock(cMutex *Mutex);
+ };
+
// cThreadLock can be used to easily set a lock in a thread and make absolutely
// sure that it will be unlocked when the block will be left. Several locks can
// be stacked, so a function that makes many calls to another function which uses