diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-23 00:25:15 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-08-02 00:25:44 +0200 |
commit | b8a420952336ed81ef5c9bf8bad90d3deaee5521 (patch) | |
tree | 91134cb8f8a69b9243ac98fe08e8f92eadc3954a /arch/um | |
parent | 1bfa2317b21750f739b59ab6df2c8efb12875045 (diff) |
um: pull interrupt_end() into userspace()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/process.c | 11 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 3 |
2 files changed, 6 insertions, 8 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index f19ca615246..57fc7028714 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -151,12 +151,10 @@ void new_thread_handler(void) * 0 if it just exits */ n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf); - if (n == 1) { - /* Handle any immediate reschedules or signals */ - interrupt_end(); + if (n == 1) userspace(¤t->thread.regs.regs); - } - else do_exit(0); + else + do_exit(0); } /* Called magically, see new_thread_handler above */ @@ -175,9 +173,6 @@ void fork_handler(void) current->thread.prev_sched = NULL; - /* Handle any immediate reschedules or signals */ - interrupt_end(); - userspace(¤t->thread.regs.regs); } diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index cd65727854e..2687f1f3a70 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -347,6 +347,9 @@ void userspace(struct uml_pt_regs *regs) /* To prevent races if using_sysemu changes under us.*/ int local_using_sysemu; + /* Handle any immediate reschedules or signals */ + interrupt_end(); + if (getitimer(ITIMER_VIRTUAL, &timer)) printk(UM_KERN_ERR "Failed to get itimer, errno = %d\n", errno); nsecs = timer.it_value.tv_sec * UM_NSEC_PER_SEC + |