Subject: Re: linux signal delivery & clone() bug
To: Simon Burge <simonb@wasabisystems.com>
From: Matthew Orgass <darkstar@pgh.net>
List: tech-kern
Date: 11/06/2000 12:38:27
On Tue, 7 Nov 2000, Simon Burge wrote:

> I must be misinterpretting the manpage.  For the following loop
> 
> 	for (Index=0; Index<NumThreads; Index++)
> 		(void)pthread_join(LWP[Index],NULL);
> 
> doesn't the last sentence quoted above imply that the next iteration
> of the loop doesn't start until the thread designated by LWP[Index]
> returns?

  That is correct and that is what happens.  In the package you use, the
sleeps are not preempted and happen sequentially, running each thread
either when it is created or when the join is done.  With thread packages
that preempt the sleeping thread, all of the sleeps happen over the same
second so once the join on the first thread finishes the others are also
done and can be joined immediately. 

Matthew Orgass
darkstar@pgh.net