summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-10-04 12:32:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-10-04 12:32:31 +0200
commit1e9b16d20bacb9795a07af5ff61db67fc78c3728 (patch)
tree89f487b4781a65b81e2625f28a18207e82eb1cec /thread.h
parent5a407d0e68c8b0ef00613f6839aeadbf6b92224a (diff)
downloadvdr-1e9b16d20bacb9795a07af5ff61db67fc78c3728.tar.gz
vdr-1e9b16d20bacb9795a07af5ff61db67fc78c3728.tar.bz2
The cThread constructor now has an additional boolean parameter that can be set to true to have this thread run at a lower priority
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/thread.h b/thread.h
index f77e8198..a08d40c9 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 2.2 2012/09/20 08:46:27 kls Exp $
+ * $Id: thread.h 2.3 2012/10/04 12:15:39 kls Exp $
*/
#ifndef __THREAD_H
@@ -83,6 +83,7 @@ private:
tThreadId childThreadId;
cMutex mutex;
char *description;
+ bool lowPriority;
static tThreadId mainThreadId;
static void *StartThread(cThread *Thread);
protected:
@@ -106,11 +107,13 @@ protected:
///< If WaitSeconds is -1, only 'running' is set to false and Cancel()
///< returns immediately, without killing the thread.
public:
- cThread(const char *Description = NULL);
+ cThread(const char *Description = NULL, bool LowPriority = false);
///< Creates a new thread.
///< If Description is present, a log file entry will be made when
///< the thread starts and stops. The Start() function must be called
///< to actually start the thread.
+ ///< LowPriority can be set to true to make this thread run at a lower
+ ///< priority.
virtual ~cThread();
void SetDescription(const char *Description, ...) __attribute__ ((format (printf, 2, 3)));
bool Start(void);