Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18920
b: refs/heads/master
c: abaf697
h: refs/heads/master
v: v3
  • Loading branch information
Gennady Sharapov authored and Linus Torvalds committed Jan 19, 2006
1 parent 47a6875 commit 4ab9d7d
Show file tree
Hide file tree
Showing 10 changed files with 602 additions and 28 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: f45d9fc9d80678c2ee22c578e503055207c46fd0
refs/heads/master: abaf69773d8dda98b917d94c07757f6520da7bec
19 changes: 19 additions & 0 deletions trunk/arch/um/include/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ extern void block_signals(void);
extern void unblock_signals(void);
extern int get_signals(void);
extern int set_signals(int enable);
extern void os_usr1_signal(int on);

/* trap.c */
extern void os_fill_handlinfo(struct kern_handlers h);
Expand Down Expand Up @@ -272,4 +273,22 @@ extern int protect(struct mm_id * mm_idp, unsigned long addr,
unsigned long len, int r, int w, int x, int done,
void **data);

/* skas/process.c */
extern int is_skas_winch(int pid, int fd, void *data);
extern int start_userspace(unsigned long stub_stack);
extern int copy_context_skas0(unsigned long stack, int pid);
extern void userspace(union uml_pt_regs *regs);
extern void map_stub_pages(int fd, unsigned long code,
unsigned long data, unsigned long stack);
extern void new_thread(void *stack, void **switch_buf_ptr,
void **fork_buf_ptr, void (*handler)(int));
extern void thread_wait(void *sw, void *fb);
extern void switch_threads(void *me, void *next);
extern int start_idle_thread(void *stack, void *switch_buf_ptr,
void **fork_buf_ptr);
extern void initial_thread_cb_skas(void (*proc)(void *),
void *arg);
extern void halt_skas(void);
extern void reboot_skas(void);

#endif
3 changes: 0 additions & 3 deletions trunk/arch/um/include/skas/mode-skas.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ extern unsigned long exec_fpx_regs[];
extern int have_fpx_regs;

extern void sig_handler_common_skas(int sig, void *sc_ptr);
extern void halt_skas(void);
extern void reboot_skas(void);
extern void kill_off_processes_skas(void);
extern int is_skas_winch(int pid, int fd, void *data);

#endif
1 change: 0 additions & 1 deletion trunk/arch/um/include/skas/mode_kern_skas.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ extern int copy_thread_skas(int nr, unsigned long clone_flags,
unsigned long sp, unsigned long stack_top,
struct task_struct *p, struct pt_regs *regs);
extern void release_thread_skas(struct task_struct *task);
extern void initial_thread_cb_skas(void (*proc)(void *), void *arg);
extern void init_idle_skas(void);
extern void flush_tlb_kernel_range_skas(unsigned long start,
unsigned long end);
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/um/include/skas/skas.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,12 @@ extern int userspace_pid[];
extern int proc_mm, ptrace_faultinfo, ptrace_ldt;
extern int skas_needs_stub;

extern void switch_threads(void *me, void *next);
extern void thread_wait(void *sw, void *fb);
extern void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
void (*handler)(int));
extern int start_idle_thread(void *stack, void *switch_buf_ptr,
void **fork_buf_ptr);
extern int user_thread(unsigned long stack, int flags);
extern void userspace(union uml_pt_regs *regs);
extern void new_thread_proc(void *stack, void (*handler)(int sig));
extern void new_thread_handler(int sig);
extern void handle_syscall(union uml_pt_regs *regs);
extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
extern int new_mm(unsigned long stack);
extern int start_userspace(unsigned long stub_stack);
extern int copy_context_skas0(unsigned long stack, int pid);
extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
extern long execute_syscall_skas(void *r);
extern unsigned long current_stub_stack(void);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/kernel/skas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Licensed under the GPL
#

obj-y := clone.o exec_kern.o mem.o mmu.o process.o process_kern.o \
obj-y := clone.o exec_kern.o mem.o mmu.o process_kern.o \
syscall.o tlb.o uaccess.o

USER_OBJS := process.o clone.o
USER_OBJS := clone.o

include arch/um/scripts/Makefile.rules

Expand Down
18 changes: 8 additions & 10 deletions trunk/arch/um/kernel/skas/process_kern.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/
Expand Down Expand Up @@ -32,7 +32,7 @@ void switch_to_skas(void *prev, void *next)
if(current->pid == 0)
switch_timers(0);

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

if(current->pid == 0)
Expand All @@ -48,8 +48,8 @@ void new_thread_handler(int sig)

fn = current->thread.request.u.thread.proc;
arg = current->thread.request.u.thread.arg;
change_sig(SIGUSR1, 1);
thread_wait(&current->thread.mode.skas.switch_buf,
os_usr1_signal(1);
thread_wait(&current->thread.mode.skas.switch_buf,
current->thread.mode.skas.fork_buf);

if(current->thread.prev_sched != NULL)
Expand Down Expand Up @@ -80,8 +80,8 @@ void release_thread_skas(struct task_struct *task)

void fork_handler(int sig)
{
change_sig(SIGUSR1, 1);
thread_wait(&current->thread.mode.skas.switch_buf,
os_usr1_signal(1);
thread_wait(&current->thread.mode.skas.switch_buf,
current->thread.mode.skas.fork_buf);

force_flush_all();
Expand All @@ -91,13 +91,13 @@ void fork_handler(int sig)
schedule_tail(current->thread.prev_sched);
current->thread.prev_sched = NULL;

/* Handle any immediate reschedules or signals */
/* Handle any immediate reschedules or signals */
interrupt_end();
userspace(&current->thread.regs.regs);
}

int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
unsigned long stack_top, struct task_struct * p,
unsigned long stack_top, struct task_struct * p,
struct pt_regs *regs)
{
void (*handler)(int);
Expand All @@ -121,8 +121,6 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
return(0);
}

extern void map_stub_pages(int fd, unsigned long code,
unsigned long data, unsigned long stack);
int new_mm(unsigned long stack)
{
int fd;
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/um/os-Linux/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,8 @@ int set_signals(int enable)

return(ret);
}

void os_usr1_signal(int on)
{
change_sig(SIGUSR1, on);
}
4 changes: 2 additions & 2 deletions trunk/arch/um/os-Linux/skas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Licensed under the GPL
#

obj-y := mem.o trap.o
obj-y := mem.o process.o trap.o

USER_OBJS := mem.o trap.o
USER_OBJS := mem.o process.o trap.o

include arch/um/scripts/Makefile.rules
Loading

0 comments on commit 4ab9d7d

Please sign in to comment.