summaryrefslogtreecommitdiff
path: root/tools/section_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/section_lock.h')
-rw-r--r--tools/section_lock.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/section_lock.h b/tools/section_lock.h
new file mode 100644
index 00000000..a054005d
--- /dev/null
+++ b/tools/section_lock.h
@@ -0,0 +1,24 @@
+/*
+ * section_lock.h:
+ *
+ * See the main source file 'xineliboutput.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: section_lock.h,v 1.1 2010-03-15 12:07:44 phintuka Exp $
+ *
+ */
+
+#ifndef __SECTION_LOCK_H
+#define __SECTION_LOCK_H
+
+#include <vdr/thread.h>
+
+class cSectionLock {
+ private:
+ cMutex& mutex;
+ public:
+ cSectionLock(cMutex& Mutex) : mutex(Mutex) { mutex.Lock(); };
+ ~cSectionLock() { mutex.Unlock(); };
+};
+
+#endif // __SECTION_LOCK_H