From af6b8ff5330851bd12bb1b011fdbd29fead5bf3c Mon Sep 17 00:00:00 2001
From: Klaus Schmidinger <vdr@tvdr.de>
Date: Sat, 23 Oct 2004 12:43:23 +0200
Subject: Removed the usleep() call from cDvbPlayer::Action() to make VDR run
 on NPTL systems; also removed the NPTL check at startup

---
 CONTRIBUTORS |  2 ++
 HISTORY      |  3 +++
 INSTALL      |  9 +--------
 dvbplayer.c  |  4 +---
 vdr.c        | 13 +------------
 5 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index e42cd35e..ca19f561 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -798,6 +798,8 @@ Alfred Zastrow <vdr@zastrow4u.de>
  the recordings created when pausing live video
  for reporting two warnings when compiling with gcc 3.3.1
  for reporting a bug in handling menu status messages when the list contents is scrolled
+ for reporting that without the usleep() call in cDvbPlayer::Action() VDR runs on NPTL
+ systems
 
 Matthias Raus <matthias-raus@web.de>
  for reporting a problem with starting the editing process if no marks have been set
diff --git a/HISTORY b/HISTORY
index 87624d3b..d18dd6d1 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3049,3 +3049,6 @@ Video Disk Recorder Revision History
 - Fixed attaching a cPlayer to a cDevice, so that 'Operation not permited'
   errors don't occur any more (thanks to Marco Schl��ler).
 - Fixed a case where the resultBuffer in cRemux ran full before getting a sync.
+- Removed the usleep() call from cDvbPlayer::Action() to make VDR run on NPTL
+  systems (thanks to Alfred Zastrow). The NPTL check at startup has also been
+  removed.
diff --git a/INSTALL b/INSTALL
index f054d7ab..2b363d44 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,14 +7,7 @@ Version 1.3
 IMPORTANT NOTES:
 ----------------
 
-VDR currently doesn't work with NPTL ("Native Posix Thread Library").
-Either don't use NPTL, or set the environment variable
-
-  LD_ASSUME_KERNEL=2.4.1
-  
-before running VDR.
-
-Also, please make sure your environment is NOT set to use UTF-8 or
+Please make sure your environment is NOT set to use UTF-8 or
 any other multibyte character representation. Check the value of your
 $LANG or $LC_CTYPE environment variable, and if it contains something
 like "de_DE.UTF-8", make sure you set it to something like "de_DE.iso8859-1"
diff --git a/dvbplayer.c b/dvbplayer.c
index c9cdc1ab..d583fe6b 100644
--- a/dvbplayer.c
+++ b/dvbplayer.c
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: dvbplayer.c 1.25 2004/10/15 13:07:55 kls Exp $
+ * $Id: dvbplayer.c 1.26 2004/10/23 12:39:35 kls Exp $
  */
 
 #include "dvbplayer.h"
@@ -490,8 +490,6 @@ void cDvbPlayer::Action(void)
                     break;
                     }
                  }
-              else//XXX
-                 usleep(1); // this keeps the CPU load low
               }
 
            // Store the frame in the buffer:
diff --git a/vdr.c b/vdr.c
index 6d76f178..80f80f54 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
  *
  * The project's page is at http://www.cadsoft.de/vdr
  *
- * $Id: vdr.c 1.187 2004/10/17 11:50:21 kls Exp $
+ * $Id: vdr.c 1.188 2004/10/23 12:40:24 kls Exp $
  */
 
 #include <getopt.h>
@@ -85,17 +85,6 @@ static void Watchdog(int signum)
 
 int main(int argc, char *argv[])
 {
-#ifdef _CS_GNU_LIBPTHREAD_VERSION
-  // Check for NPTL and exit if present - VDR apparently doesn't run well with NPTL:
-  char LibPthreadVersion[128];
-  if (confstr(_CS_GNU_LIBPTHREAD_VERSION, LibPthreadVersion, sizeof(LibPthreadVersion)) > 0) {
-     if (strstr(LibPthreadVersion, "NPTL")) {
-        fprintf(stderr, "vdr: please turn off NPTL by setting 'export LD_ASSUME_KERNEL=2.4.1' before starting VDR\n");
-        return 2;
-        }
-     }
-#endif
-
   // Check for UTF-8 and exit if present - asprintf() will fail if it encounters 8 bit ASCII codes
   char *LangEnv;
   if ((LangEnv = getenv("LANG"))    != NULL && strcasestr(LangEnv, "utf") ||
-- 
cgit v1.2.3