Messages in this thread | | | Date | Tue, 28 Mar 2000 09:55:55 -0800 (PST) | From | Jeremy Fitzhardinge <> | Subject | Re: Slow pthread_create() under high load |
| |
On 28-Mar-00 yodaiken@fsmlabs.com wrote: >> IMHO, at least sharing PIDs would be a useful thing. Signal queues >> would be nice, but there are other ways to deal with that. > > Can someone tell me why: > > pthread_creat( ....) > if this is the first created thread > rootpid = getpid(); > redefine getpid === return rootpid > > Doesn't work?
That would solve the problem of a given thread seeing its own thread, but it doesn't deal with the problem of pthread signal semantics. Under pthreads, if you send a signal to a process (a bunch of threads), it can be handled by any thread which isn't blocking that signal. Linux only allows you to send signals to a particular task. If you put all the tasks into a group you could signal them all, but that's not right either, since the signal could be handled multiple times by multiple threads.
J
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |