I do not understand why you want to link this to the stack at all. It
doesn't really make sense to me. The "thread exited" thing has nothing to
do with the stack, and you're only focused on that because you want to
free (or re-use) the stack when it exits.
I personally believe that it would make a lot more sense to either pass in
a totally independent pointer, or - my preferred approach - to just re-use
the TID pointer. Think about it: thread creation sets the TID (if
CLONE_SETTID is set) in the thread data structures, and thread exit clears
the TID (if CLONE_CLRTID is set). That sounds like a _sensible_ interface.
(CLONE_RELEASE_VM doesn't really make sense as a name. It doesn't describe
what the flag _means_, it really only describes an implementation detail
inside the kernel).
Eh?
Linus
-
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/