Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83180
b: refs/heads/master
c: 291248f
h: refs/heads/master
v: v3
  • Loading branch information
Karol Swietlicki authored and Linus Torvalds committed Feb 5, 2008
1 parent eab79f2 commit b1ddf64
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 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: ab8cda4347e2ffed658e522c9398932509c278bd
refs/heads/master: 291248fd6e371bcbfb8a77689c5d741a1527488f
19 changes: 8 additions & 11 deletions trunk/arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,29 +81,28 @@ static inline void set_current(struct task_struct *task)
{ external_pid(task), task });
}

extern void arch_switch_to(struct task_struct *from, struct task_struct *to);
extern void arch_switch_to(struct task_struct *to);

void *_switch_to(void *prev, void *next, void *last)
{
struct task_struct *from = prev;
struct task_struct *to= next;
struct task_struct *to = next;

to->thread.prev_sched = from;
set_current(to);

do {
current->thread.saved_task = NULL;

switch_threads(&from->thread.switch_buf,
&to->thread.switch_buf);
switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);

arch_switch_to(current->thread.prev_sched, current);
arch_switch_to(current);

if (current->thread.saved_task)
show_regs(&(current->thread.regs));
next= current->thread.saved_task;
prev= current;
} while(current->thread.saved_task);
next = current->thread.saved_task;
prev = current;
} while (current->thread.saved_task);

return current->thread.prev_sched;

Expand Down Expand Up @@ -161,8 +160,6 @@ void new_thread_handler(void)
void fork_handler(void)
{
force_flush_all();
if (current->thread.prev_sched == NULL)
panic("blech");

schedule_tail(current->thread.prev_sched);

Expand All @@ -171,7 +168,7 @@ void fork_handler(void)
* arch_switch_to isn't needed. We could want to apply this to
* improve performance. -bb
*/
arch_switch_to(current->thread.prev_sched, current);
arch_switch_to(current);

current->thread.prev_sched = NULL;

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/um/sys-i386/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#include "asm/uaccess.h"
#include "skas.h"

extern int arch_switch_tls(struct task_struct *from, struct task_struct *to);
extern int arch_switch_tls(struct task_struct *to);

void arch_switch_to(struct task_struct *from, struct task_struct *to)
void arch_switch_to(struct task_struct *to)
{
int err = arch_switch_tls(from, to);
int err = arch_switch_tls(to);
if (!err)
return;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-i386/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void clear_flushed_tls(struct task_struct *task)
* SKAS patch.
*/

int arch_switch_tls(struct task_struct *from, struct task_struct *to)
int arch_switch_tls(struct task_struct *to)
{
if (!host_supports_tls)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-x86_64/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
return ret;
}

void arch_switch_to(struct task_struct *from, struct task_struct *to)
void arch_switch_to(struct task_struct *to)
{
if ((to->thread.arch.fs == 0) || (to->mm == NULL))
return;
Expand Down

0 comments on commit b1ddf64

Please sign in to comment.