Messages in this thread |  | | Subject | Re: SCO: "thread creation is about a thousand times faster than on | From | David Wragg <> | Date | 26 Aug 2000 17:25:19 +0000 |
| |
Linus Torvalds <torvalds@transmeta.com> writes: > Well, CLONE_PARENT is already there. And has been for a long time.
And it works fine. I've modified LinuxThreads in glibc-2.1.3 to use it (patch at <http://www.doc.ic.ac.uk/~dpw/linux/dc/>). The remaining loose end I have to address is to do with the setting the scheduling parameters for the newly created thread specified in the call the pthread_create(). (The scheduling parameters need to be set by the time pthread_create() returns, and also by the time the new thread's start function gets called. This can be solved by calling sched_setscheduler() both in the parent thread and the child thread, but then both threads need to wait until the other one has finished making the call, and the two sched_setscheduler() syscalls tend to contend with each other on SMP, so the performance isn't wonderful.)
> The CLONE_WAITPID patches I don't remember, so please refresh my memory > about what they look like, and why they were needed in the first place..
POSIX says that any thread can do a wait() et al. for a child process. But Linux currently thinks that a child processes is a child of a particular thread, and so only that thread can wait() for it.
David Wragg
- 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/
|  |