[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Shared Signal Queue Patch [Was Re: SCO: "thread creation is about a thousand times faster than on na
From:       "Robert H. de Vries" <rhdv () rhdv ! cistron ! nl>
Date:       2000-08-26 11:14:19
[Download RAW message or body]

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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic