lkml.org 
[lkml]   [2010]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: while_each_thread() under rcu_read_lock() is broken?
On 06/24/2010 12:07 PM, Paul E. McKenney wrote:

> 3. The thread-group leader might do pthread_exit(), removing itself
> from the thread group -- and might do so while the hapless reader
> is referencing that thread.
>
> But isn't this prohibited? Or is it really legal to do a
> pthread_create() to create a new thread and then have the
> parent thread call pthread_exit()? Not something I would
> consider trying in my own code! Well, I might, just to
> be perverse, but... ;-)

I believe SUS allows the main thread to explicitly call pthread_exit(),
leaving the other threads to run. If the main() routine just returns
then it implicitly calls exit().

Chris

--
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com


\
 
 \ /
  Last update: 2010-06-24 21:03    [W:0.555 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site