diff options
author | jdike <jdike> | 2003-02-27 17:02:13 +0000 |
---|---|---|
committer | jdike <jdike> | 2003-02-27 17:02:13 +0000 |
commit | d812b5af82f1cbb6261a7b25f025f92ed4a77004 (patch) | |
tree | a4cc2799f67cd3e386d9872bf69358c65457d2fd | |
parent | 75520bfe0e342a590f5628da531cf1f597bea17d (diff) | |
download | uml-history-d812b5af82f1cbb6261a7b25f025f92ed4a77004.tar.gz |
Cleaned up the signal blocking at thread startup time.v_2_4_19_51
-rw-r--r-- | arch/um/kernel/tt/process_kern.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index c11db6f..f858fb8 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c @@ -125,19 +125,22 @@ static void new_thread_handler(int sig) free_page(current->thread.temp_stack); set_cmdline("(kernel thread)"); force_flush_all(); + if(current->thread.prev_sched != NULL) schedule_tail(current->thread.prev_sched); current->thread.prev_sched = NULL; + change_sig(SIGUSR1, 1); change_sig(SIGVTALRM, 1); change_sig(SIGPROF, 1); - unblock_signals(); + sti(); if(!run_kernel_thread(fn, arg, ¤t->thread.exec_buf)) do_exit(0); } static int new_thread_proc(void *stack) { + cli(); init_new_thread_stack(stack, new_thread_handler); os_usr1_process(os_getpid()); return(0); @@ -165,6 +168,7 @@ static void finish_fork_handler(int sig) protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 1, 0, 1); task_protections((unsigned long) current); + if(current->thread.prev_sched != NULL) schedule_tail(current->thread.prev_sched); current->thread.prev_sched = NULL; @@ -175,16 +179,11 @@ static void finish_fork_handler(int sig) set_user_mode(current); } -static int sigusr1 = SIGUSR1; - int fork_tramp(void *stack) { - int sig = sigusr1; - cli(); init_new_thread_stack(stack, finish_fork_handler); - - kill(os_getpid(), sig); + os_usr1_process(os_getpid()); return(0); } |