Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40135
b: refs/heads/master
c: 8cf2c51
h: refs/heads/master
i:
  40133: 9ed55a5
  40131: 264b6b6
  40127: d737a25
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Oct 21, 2006
1 parent efc023c commit b8b0604
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6bf2dafad18c119beb534cbb3d882fe7a6c3f529
refs/heads/master: 8cf2c51927bbeefafc25193d01b91f9ed3806e96
6 changes: 1 addition & 5 deletions trunk/arch/i386/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ extern void kernel_thread_helper(void);
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
struct pt_regs regs;
int err;

memset(&regs, 0, sizeof(regs));

Expand All @@ -351,10 +350,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;

/* Ok, create the new process.. */
err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
if (err == 0) /* terminate kernel stack */
task_pt_regs(current)->eip = 0;
return err;
return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
}
EXPORT_SYMBOL(kernel_thread);

Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -980,11 +980,6 @@ ENTRY(kernel_thread)
call do_fork
movq %rax,RAX(%rsp)
xorl %edi,%edi
test %rax,%rax
jnz 1f
/* terminate stack in child */
movq %rdi,RIP(%rsp)
1:

/*
* It isn't worth to check for reschedule here,
Expand Down

0 comments on commit b8b0604

Please sign in to comment.