Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9010
b: refs/heads/master
c: f6e34c6
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Sep 17, 2005
1 parent bfa8c2b commit da195a0
Show file tree
Hide file tree
Showing 6 changed files with 15 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: 6add9f7f529b124938d14ae9db5a952d1272075a
refs/heads/master: f6e34c6af6f18bd6c66bfb1c6a7c57068412aa73
12 changes: 10 additions & 2 deletions trunk/arch/um/kernel/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,16 @@ void set_current(void *t)

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

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

CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next);

return(current->thread.prev_sched);

}

void interrupt_end(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/skas/include/mode_kern-skas.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "asm/ptrace.h"

extern void flush_thread_skas(void);
extern void *switch_to_skas(void *prev, void *next);
extern void switch_to_skas(void *prev, void *next);
extern void start_thread_skas(struct pt_regs *regs, unsigned long eip,
unsigned long esp);
extern int copy_thread_skas(int nr, unsigned long clone_flags,
Expand Down
7 changes: 1 addition & 6 deletions trunk/arch/um/kernel/skas/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "proc_mm.h"
#include "registers.h"

void *switch_to_skas(void *prev, void *next)
void switch_to_skas(void *prev, void *next)
{
struct task_struct *from, *to;

Expand All @@ -35,16 +35,11 @@ void *switch_to_skas(void *prev, void *next)
if(current->pid == 0)
switch_timers(0);

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

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

if(current->pid == 0)
switch_timers(1);

return(current->thread.prev_sched);
}

extern void schedule_tail(struct task_struct *prev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/tt/include/mode_kern-tt.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "asm/ptrace.h"
#include "asm/uaccess.h"

extern void *switch_to_tt(void *prev, void *next);
extern void switch_to_tt(void *prev, void *next);
extern void flush_thread_tt(void);
extern void start_thread_tt(struct pt_regs *regs, unsigned long eip,
unsigned long esp);
Expand Down
7 changes: 1 addition & 6 deletions trunk/arch/um/kernel/tt/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "init.h"
#include "tt.h"

void *switch_to_tt(void *prev, void *next, void *last)
int switch_to_tt(void *prev, void *next, void *last)
{
struct task_struct *from, *to, *prev_sched;
unsigned long flags;
Expand All @@ -36,8 +36,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
from = prev;
to = next;

to->thread.prev_sched = from;

cpu = from->thread_info->cpu;
if(cpu == 0)
forward_interrupts(to->thread.mode.tt.extern_pid);
Expand All @@ -53,7 +51,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
forward_pending_sigio(to->thread.mode.tt.extern_pid);

c = 0;
set_current(to);

err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c));
if(err != sizeof(c))
Expand Down Expand Up @@ -85,8 +82,6 @@ void *switch_to_tt(void *prev, void *next, void *last)

flush_tlb_all();
local_irq_restore(flags);

return(current->thread.prev_sched);
}

void release_thread_tt(struct task_struct *task)
Expand Down

0 comments on commit da195a0

Please sign in to comment.