|
@@ -323,7 +323,6 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
|
|
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
|
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
|
{
|
|
{
|
|
struct pt_regs regs;
|
|
struct pt_regs regs;
|
|
- int pid;
|
|
|
|
|
|
|
|
memset(®s, 0, sizeof(regs));
|
|
memset(®s, 0, sizeof(regs));
|
|
regs.regs[2] = (unsigned long)arg;
|
|
regs.regs[2] = (unsigned long)arg;
|
|
@@ -333,12 +332,8 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
|
regs.sr = (1 << 30);
|
|
regs.sr = (1 << 30);
|
|
|
|
|
|
/* Ok, create the new process.. */
|
|
/* 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);
|
|
®s, 0, NULL, NULL);
|
|
-
|
|
|
|
- trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
|
|
|
|
-
|
|
|
|
- return pid;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|