int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
struct pt_regs regs;
- int pid;
memset(®s, 0, sizeof(regs));
regs.regs[2] = (unsigned long)arg;
regs.sr = (1 << 30);
/* Ok, create the new process.. */
- pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
+ return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
®s, 0, NULL, NULL);
-
- trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
-
- return pid;
}
/*