Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 15:38:25 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Martin Blapp <mb@imp.ch>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: libc_r patches and some questions
Message-ID:  <Pine.GSO.4.10.10202261531460.22616-100000@pcnet1.pcnet.com>
In-Reply-To: <20020226190200.A26547-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Feb 2002, Martin Blapp wrote:
> Hi all,
> 
> I've recieved patches from Carlos Fernando Assis Paniago <pan@cnpm.embrapa.br>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10202261531460.22616-100000>