Re: process shared mutex/cond var

"Dr. Uwe Girlich" <[email protected]>
Newsgroups gmane.linux.ngpt.devel
Message-ID <[email protected]>
Hello!

On Mon, Aug 19, 2002 at 08:22:27AM +0200, Hahn, Karsten wrote:
> On Friday 16 August 2002 08:50, Pavan Sikka wrote:
> > The producer freezes as soon as the consumer starts. The consumer goes
> > into an endless loop around the pthread_cond_wait since it returns
> > immediately with no error !
> I had the same problem (linux 2.4.19 with futex patch) and solved it (after 
> spending two days with debugging) by upgrading to linux 2.5.31.
> I'm not sure if this is a bug in ngpt or linux, maybe someone with a little 
> more kernel insight can look into it?
Apply the attached patch file. The problem was already in NGPT 2.0.0 and I was
sure the patch was included in 2.0.1 but this is unfortunately not the case.

Bye, Uwe

-- 
Dr. Uwe Girlich              email: [email protected]
Philosys Software GmbH       www: www.philosys.de
Edisonstrasse 6              phone: +49 89 321407-44
D-85716 Unterschleissheim    fax: +49 89 321407-12
bug-patch (text/plain, 352 B)
--- linux-2.4.19-rc1-ngpt-2.0.0/kernel/futex.c.orig	Wed Jul 10 16:07:09 2002
+++ linux-2.4.19-rc1-ngpt-2.0.0/kernel/futex.c	Wed Jul 10 16:07:34 2002
@@ -238,7 +238,7 @@
 
 	poll_wait(filp, &q->waiters, wait);
 	spin_lock(&futex_lock);
-	if (!list_empty(&q->list))
+	if (list_empty(&q->list))
 		ret = POLLIN | POLLRDNORM;
 	spin_unlock(&futex_lock);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.