summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-29 11:44:52 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-29 11:44:52 +0200
commite622406342c6ac1fefec5a3d2800b9c49951ab0d (patch)
tree74c8098cddc17635060fb5015ae1137afc513786 /thread.c
parent961e7a9115e52f1bd85c928a96821222c1022014 (diff)
downloadvdr-e622406342c6ac1fefec5a3d2800b9c49951ab0d.tar.gz
vdr-e622406342c6ac1fefec5a3d2800b9c49951ab0d.tar.bz2
Added cThread::SetPriority() and using it in cSectionHandler::Action() to reduce the priority of the section handler threads1.3.25
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 013b2179..9ac1b7ef 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.42 2005/05/06 14:39:15 kls Exp $
+ * $Id: thread.c 1.43 2005/05/29 11:40:30 kls Exp $
*/
#include "thread.h"
@@ -208,6 +208,12 @@ cThread::~cThread()
free(description);
}
+void cThread::SetPriority(int Priority)
+{
+ if (setpriority(PRIO_PROCESS, 0, Priority) < 0)
+ LOG_ERROR;
+}
+
void cThread::SetDescription(const char *Description, ...)
{
free(description);