From patchwork Fri Oct 21 21:45:14 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Share X-Patchwork-Id: 12067 Received: from mailout09.sul.t-online.com ([194.25.134.84]) by www.linuxtv.org with esmtp (Exim 4.50) id 1ET4hN-0006gu-Fg for vdr@linuxtv.org; Fri, 21 Oct 2005 23:45:13 +0200 Received: from fwd29.aul.t-online.de by mailout09.sul.t-online.com with smtp id 1ET4hK-0007Ep-00; Fri, 21 Oct 2005 23:45:10 +0200 Received: from pentiumiv (XZOJpiZlreL7KWmBHAxMT3uqgib-xCMLQ2a25ogzZzrmRgoWmNNSov@[84.178.48.148]) by fwd29.sul.t-online.de with esmtp id 1ET4h8-0pvUbg0; Fri, 21 Oct 2005 23:44:58 +0200 Message-ID: <007d01c5d688$b82a1870$0100a8c0@pentiumiv> From: "Andreas Share" To: Date: Fri, 21 Oct 2005 23:45:14 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-ID: XZOJpiZlreL7KWmBHAxMT3uqgib-xCMLQ2a25ogzZzrmRgoWmNNSov X-TOI-MSGID: 7ce7469d-8a0d-4e8d-a370-49669e074e45 Subject: [vdr] [PATCH] rcu NPTL fix for 1.3.34 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 21:45:13 -0000 Status: O X-Status: X-Keywords: X-UID: 5594 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 int n = 0; --- 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 ";