summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-01-14 14:08:47 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-01-14 14:08:47 +0100
commit0ad4b2a713d3188e54c6833fc5860109725fca0a (patch)
tree60f16a5f7f5b161919a72178e0ab4136ffbf8e2f /thread.c
parent0d596d04787086c607eedb1de3dd1d08a1db983e (diff)
downloadvdr-0ad4b2a713d3188e54c6833fc5860109725fca0a.tar.gz
vdr-0ad4b2a713d3188e54c6833fc5860109725fca0a.tar.bz2
Made cCondWait::SleepMs() sleep at least 3ms to avoid a possible busy wait
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index fe3359bf..eb009f14 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.40 2004/12/19 10:43:14 kls Exp $
+ * $Id: thread.c 1.41 2005/01/14 13:59:48 kls Exp $
*/
#include "thread.h"
@@ -36,7 +36,7 @@ cCondWait::~cCondWait()
void cCondWait::SleepMs(int TimeoutMs)
{
cCondWait w;
- w.Wait(TimeoutMs);
+ w.Wait(max(TimeoutMs, 3)); // making sure the time is >2ms to avoid a possible busy wait
}
bool cCondWait::Wait(int TimeoutMs)