From owner-freebsd-current Tue Feb 26 12:38:31 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 8C71F37B402 for ; Tue, 26 Feb 2002 12:38:26 -0800 (PST) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.1/8.12.1) with ESMTP id g1QKcPHE023546; Tue, 26 Feb 2002 15:38:25 -0500 (EST) Date: Tue, 26 Feb 2002 15:38:25 -0500 (EST) From: Daniel Eischen To: Martin Blapp Cc: freebsd-current@FreeBSD.ORG Subject: Re: libc_r patches and some questions In-Reply-To: <20020226190200.A26547-100000@levais.imp.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 26 Feb 2002, Martin Blapp wrote: > Hi all, > > I've recieved patches from Carlos Fernando Assis Paniago > to get Openoffice Build 641 running. > > Since I'm not familiar, I hope someone else can look at them and point me > to the right direction to have a working OpenOffice port. > > > Tim find this bug. The old version doesn have this loop that is a infinite > > loop in OO. > > Comment: I guess this is a bug in openoffice. Can someone help me to track it > down ? > > --- lib/libc_r/uthread/uthread_join.c.orig Wed Dec 19 23:29:20 2001 > +++ lib/libc_r/uthread/uthread_join.c Tue Feb 26 18:53:28 2002 > @@ -124,10 +124,7 @@ > /* Keep track of which thread we're joining to: */ > curthread->join_status.thread = pthread; > > - while (curthread->join_status.thread == pthread) { > - /* Schedule the next thread: */ > - _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); > - } > + _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); This isn't a correct fix. The joinee (the thread being joined _to_) is responsible for clearing the joiner's join_status.thread when he detaches/exits. Threads in a join operation are allowed to call signal handlers, so it needs to be in a loop (in theory, the joinee could detach/exit while the joiner was running the signal handler). If there is a bug, it is in the exit or detach code. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message