From abaf69773d8dda98b917d94c07757f6520da7bec Mon Sep 17 00:00:00 2001 From: Gennady Sharapov Date: Wed, 18 Jan 2006 17:42:46 -0800 Subject: [PATCH] uml: move libc-dependent skas process handling The serial UML OS-abstraction layer patch (um/kernel/skas dir). This moves all systemcalls from skas/process.c file under os-Linux dir and join skas/process.c and skas/process_kern.c files. Signed-off-by: Gennady Sharapov Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/skas/Makefile | 4 ++-- arch/um/kernel/skas/process_kern.c | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'arch/um/kernel/skas') diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile index eb664c6..57181a9 100644 --- a/arch/um/kernel/skas/Makefile +++ b/arch/um/kernel/skas/Makefile @@ -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 diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index a340006..3f70a2e 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -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) @@ -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(¤t->thread.mode.skas.switch_buf, + os_usr1_signal(1); + thread_wait(¤t->thread.mode.skas.switch_buf, current->thread.mode.skas.fork_buf); if(current->thread.prev_sched != NULL) @@ -80,8 +80,8 @@ void release_thread_skas(struct task_struct *task) void fork_handler(int sig) { - change_sig(SIGUSR1, 1); - thread_wait(¤t->thread.mode.skas.switch_buf, + os_usr1_signal(1); + thread_wait(¤t->thread.mode.skas.switch_buf, current->thread.mode.skas.fork_buf); force_flush_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(¤t->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); @@ -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; -- cgit v1.1