[PATCH] rcu NPTL fix for 1.3.34

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




--- 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vdr-1.3.34-rcu.diff
Type: application/octet-stream
Size: 870 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20051021/d366ea2f/vdr-1.3.34-rcu.obj

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux