lkml.org 
[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2011 Jasper Spaans