mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 19:33:15 +01:00
Added copy_vma() function.
Sorting out return_from_fork() and kernel stack setup for the child.
This commit is contained in:
@@ -60,6 +60,11 @@ int thread_start(struct task_ids *ids)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int setup_new_ktcb(struct ktcb *new, struct ktcb *orig)
|
||||
{
|
||||
/* Setup new thread stack */
|
||||
new->context.sp =
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a thread, with a new thread id, and depending on the flags,
|
||||
@@ -112,6 +117,10 @@ out:
|
||||
waitqueue_head_init(&new->wqh_send);
|
||||
waitqueue_head_init(&new->wqh_recv);
|
||||
|
||||
/* When space is copied kernel-side tcb and stack are also copied */
|
||||
if (flags == THREAD_CREATE_COPYSPC)
|
||||
setup_new_ktcb(new, task);
|
||||
|
||||
/* Add task to global hlist of tasks */
|
||||
add_task_global(new);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user