> But at that time, the process 0 which calls kernel_thread is executing
> in Kernel mode, so why should some process in kernel mode make a
> system call??
it's mainly done to get a clean ptregs variable the new thread can be
created from. Just calling do_fork() is not enough. It's also a good test
of the syscall return path.
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/