lkml.org 
[lkml]   [2000]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: thread group comments
On Fri, Sep 01, 2000 at 03:06:52PM -0700, Linus Torvalds wrote:
>
> Good that _somebody_ actually looked at the code. I'll make some more
> modifications to handle blocked signals correctly (ie handling the case
> where the signal is blocked in all threads and then unblocked in one of
> them _after_ it was delivered), but I've been disappointed by how much hot
> air there's been on the list, and how little comments on how the actual
> code works.

I've been looking at the code and I think it could be extended a bit:

I've been thinking about how to best get rid of the thread manager for
thread creation in LinuxThreads. It is currently needed to do the wait.

I think the easiest way is to just implement the Single Unix SA_NOCLDWAIT
and add a prctl to set a queued exit signal to some arbitary pid. That pid
could be the thread group so some thread would just handle it and do the
necessary LinuxThreads bookkeeping.
The queued exit signal could carry which thread has died. The only tricky
issue is what to do when the exit signal cannot be queued because there
are too many threads in flight, in this case it makes sense to just make
it pending without any data (the thread library can search some global
data structure in this case)

All these changes are very easy.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.100 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site