Added copy_vma() function.

Sorting out return_from_fork() and kernel stack setup for the child.
This commit is contained in:
Bahadir Balban
2008-08-21 12:18:38 +03:00
parent 69db3a04c0
commit dada3e0b2c
5 changed files with 114 additions and 427 deletions

View File

@@ -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);