Changes to make sure after a fork a child process can safely return.

This copies the parent kernel stack to child only for the part where
the previous context is saved. Then the child registers are modified
so that it would begin execution from returning of the system call.
This commit is contained in:
Bahadir Balban
2008-08-21 16:21:08 +03:00
parent dada3e0b2c
commit 3ce220f062
7 changed files with 84 additions and 21 deletions

View File

@@ -57,8 +57,11 @@ struct ktcb {
/* User context */
task_context_t context;
/* Reference to syscall saved context */
syscall_args_t *syscall_regs;
/*
* Reference to the context on stack
* saved at the beginning of a syscall trap.
*/
syscall_context_t *syscall_regs;
/* Runqueue related */
struct list_head rq_list;