mirror of
https://github.com/drasko/codezero.git
synced 2026-04-23 12:19:05 +02:00
Moved thread id assignment to task_create for new tasks with parents.
Added shared parenting for CLONE_THREAD and CLONE_PARENT
This commit is contained in:
@@ -58,11 +58,12 @@ int sys_fork(struct tcb *parent)
|
||||
int err;
|
||||
struct tcb *child;
|
||||
struct exregs_data exregs;
|
||||
struct task_ids ids = {
|
||||
.tid = TASK_ID_INVALID,
|
||||
.spid = parent->spid, /* spid to copy from */
|
||||
.tgid = TASK_ID_INVALID, /* FIXME: !!! FIX THIS */
|
||||
};
|
||||
struct task_ids ids;
|
||||
// = {
|
||||
// .tid = TASK_ID_INVALID,
|
||||
// .spid = parent->spid, /* spid to copy from */
|
||||
// .tgid = TASK_ID_INVALID, /* FIXME: !!! FIX THIS */
|
||||
// };
|
||||
|
||||
/* Make all shadows in this task read-only */
|
||||
vm_freeze_shadows(parent);
|
||||
@@ -108,8 +109,8 @@ int do_clone(struct tcb *parent, unsigned long child_stack, unsigned int flags)
|
||||
struct tcb *child;
|
||||
int err;
|
||||
|
||||
ids.tid = TASK_ID_INVALID;
|
||||
ids.spid = parent->spid;
|
||||
//ids.tid = TASK_ID_INVALID;
|
||||
//ids.spid = parent->spid;
|
||||
|
||||
|
||||
/* Determine whether the cloned thread is in parent's thread group */
|
||||
|
||||
Reference in New Issue
Block a user