Re: [patch] user-vm-unlock-2.5.31-A2

From: Ingo Molnar (mingo@elte.hu)
Date: Fri Aug 16 2002 - 04:49:23 EST


On Thu, 15 Aug 2002, Linus Torvalds wrote:

> The problem spot is the _fork_ from process X. Which gives a address in
> process' _X_ virtual address space - used for SETTID.
>
> See? Process _X_ is not threaded, and is not maintaining any thread data
> structures.

okay, this is the misunderstanding then. If it fork()s and then uses some
threading (which uses clone()) then in all cases i know about it must be
linked against some threading library. Otherwise Y couldnt do a clone()
call and expect threading to work. In theory Y could 'become' a
threading-capable process, but right now no threading library i'm aware of
allows this - lots of standard C calls must be threading-aware and
threading-safe. So right now 'threading' is a property that comes with the
process image at exec() time. But this must not be so from a conceptual
angle, so i agree with you.

(but the question is mostly academic anyway, because it makes perfect
sense to use a pure SETTID for a completely unthreaded application, to get
the fork() PID return value in the child's context as well.)

        Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:11 EST