mirror of
https://github.com/drasko/codezero.git
synced 2026-02-05 22:43:15 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user