[vdr] [PATCH] rcu NPTL fix for 1.3.34

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Fri Nov 4 16:40:37 CET 2005


Andreas Share wrote:
> Hi,
> 
> attached patch should make the rcu code NPTL compatible. Without the 
> patch using an RCU will fail (vdr hang during startup) on an NPTL 
> enabled system.
> 
> I have only move over L. Nussels lirc NPTL fix to the rcu code.
> 
> Greetings
> 
> Andreas

Have you actually tested this?
I wonder if simply removing all lock calls would work,
because there _is_ a thread and a foreground function that
both want to transfer data...

Klaus

> --- rcu.c.org 2005-10-21 23:29:58.000000000 +0200
> +++ rcu.c 2005-10-21 23:29:36.000000000 +0200
> @@ -53,7 +53,11 @@
> 
> cRcuRemote::~cRcuRemote()
> {
> +  int fh = f;
> +  f = -1;
>   Cancel();
> +  if (fh >= 0)
> +     close(fh);
> }
> 
> bool cRcuRemote::Ready(void)
> @@ -100,7 +104,6 @@
> 
>   while (Running() && f >= 0) {
> 
> -        LOCK_THREAD;
> 
>         if (ReceiveByte(REPEATLIMIT) == 'X') {
>            for (int i = 0; i < 6; i++) {
> @@ -192,7 +195,6 @@
> 
> bool cRcuRemote::SendByte(unsigned char c)
> {
> -  LOCK_THREAD;
> 
>   for (int retry = 5; retry--;) {
>       if (SendByteHandshake(c))
> @@ -225,7 +227,6 @@
> 
> bool cRcuRemote::Number(int n, bool Hex)
> {
> -  LOCK_THREAD;
> 
>   if (!Hex) {
>      char buf[8];
> @@ -248,7 +249,6 @@
> 
> bool cRcuRemote::String(char *s)
> {
> -  LOCK_THREAD;
> 
>   const char *chars = mode == modeH ? "0123456789ABCDEF" : 
> "0123456789-EHLP ";
>   int n = 0;




More information about the vdr mailing list