lkml.org 
[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectShared Signal Queue Patch [Was Re: SCO: "thread creation is about a thousand times faster than on native Linux"]
Date
On Thu, 24 Aug 2000, Linus Torvalds wrote:

>Now, the problem is that the thread group kill thing for true POSIX
>threads signal behaviour probably has to do some strange magic to get the
>pthreads signal semantics right. I don't even know the exact details here,
>so somebody who _really_ knows pthreads needs to look long and hard at
>this (efficiency here may require that we have a circular list of each
>"thread ID group" - ie that we add the proper process pointer list that
>gets updated at fork() and exit() so that we can easily walk every process
>in the process group list).

The patch on http://www.rhdv.cistron.nl/sigqueue.html does something like
this.
It has a linked list with all the threads in the thread group. There is no
thread group ID. The existing kill() system call does the "right thing" when
a signal is sent to a process with a thread group (i.e. send it to the shared
signal queue).
Of course then you need a separate system call to send a signal to an
individual thread, this one I call kill_thread(). This call is used by
pthread_kill().
It needs some more work. It doesn't handle SIGKILL, SIGSTOP, etc. correctly
for instance.

However it is actual tested code, so shoot.

Robert

--
Robert de Vries
rhdv@rhdv.cistron.nl
-
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.169 / U:2.756 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site