From: Paolo 'Blaisorblade' Giarrusso Date: Sun, 1 May 2005 15:58:56 +0000 (-0700) Subject: [PATCH] uml: commentary about forking flag X-Git-Tag: v2.6.12-rc4~136^2~114 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=acef2e55d2a1b59bb5610cacc546c1d1b5de2dc9;p=~shefty%2Frdma-dev.git [PATCH] uml: commentary about forking flag Add some commentary about UML internals, for a strange trick. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 4d9404989b5..b953b1ad3b0 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h @@ -17,6 +17,10 @@ struct task_struct; struct mm_struct; struct thread_struct { + /* This flag is set to 1 before calling do_fork (and analyzed in + * copy_thread) to mark that we are begin called from userspace (fork / + * vfork / clone), and reset to 0 after. It is left to 0 when called + * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ int forking; int nsyscalls; struct pt_regs regs;