Messages in this thread | | | From | cd_smith@ou ... | Date | Fri, 30 Jul 1999 23:19:07 -0500 (CDT) | Subject | Re: linuxthreads and tid testing |
| |
On Fri, 30 Jul 1999, Eric Paire wrote: > Don't you think that this should be the purpose of the CLONE_PID flag ? > With this flag, all system calls returning the current pid would return > the pid of the last clone() call without this flag set, except getpid() > (in order to get a standard way to get the actual kernel pid of a > CLONE_PID thread, and because this could be hidden by the libpthread).
Doesn't this strike you as a bit ugly? If EVERYTHING is using the same pid, then why not make getpid() use it as well, and then add a system call to get the thread ID. It's NOT an appreciable amount of extra kernel code, and it makes everything a lot more consistent. Keeping the kernel small is an admirable goal, but not if it means inventing completely pointless and arbitrary behavior to eliminate a few lines of kernel code. Sometimes the kernel is the right place for implementing certain behavior, especially when that behavior changes the common conception of how the kernel performs its tasks.
Chris Smith <cd_smith@ou.edu>
- 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/
| |