Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2003 08:47:03 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Marc Olzheim <marcolz@stack.nl>
Cc:        hackers@freebsd.org
Subject:   Re: libc_r/uthread/uthread_join.c
Message-ID:  <Pine.GSO.4.10.10312310838140.25057-100000@pcnet5.pcnet.com>
In-Reply-To: <20031231111642.GA13386@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 31 Dec 2003, Marc Olzheim wrote:

> Hi.
> 
> Is there a reason why in the case that a thread is not done yet,
> pthread_join() does not call _thread_kern_sig_undefer() ?
> 
> We have a program where one thread consumes all CPU it can get for
> blocks of data.
> A status thread is spawned as soon as the main thread starts working on
> a new block, printing an 'x % done' message and sleeping for a second in
> a loop. When the block is processed, the status thread is
> pthread_cancel()d and the main thread does a pthread_join() to wait for
> the status thread to exit. Now, when the second block is to be
> processed, a new status thread is spawned, but since signals are still
> defered and the main thread needs all the cpu it can get, it doesn't get
> scheduled in anymore.
> 
> The following fixed the problem in 4-STABLE and it seems to work ok, but
> I'm no sure if there was a reason for the omission of the call in that
> case...

No, it looks like you found a bug.  Committed, thanks!

-- 
Dan Eischen



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