aboutsummaryrefslogtreecommitdiff
path: root/kernel/proc
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-05-13 12:10:55 +0000
committersotech117 <michael_foiani@brown.edu>2024-05-13 12:10:55 +0000
commit7585cb5ad84babe9db8c6595de464e33fb878f0c (patch)
tree3acdd29920420ca341ea7e3f90d60b16c384ce51 /kernel/proc
parentf09878f6327426631d9419d825a4e8396e3b9dc4 (diff)
s5 fixes and issues with weenix
Diffstat (limited to 'kernel/proc')
-rw-r--r--kernel/proc/kthread.c3
-rw-r--r--kernel/proc/proc.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/proc/kthread.c b/kernel/proc/kthread.c
index b614ac3..722d932 100644
--- a/kernel/proc/kthread.c
+++ b/kernel/proc/kthread.c
@@ -140,8 +140,6 @@ kthread_t *kthread_clone(kthread_t *thr)
new_thread->kt_kstack = new_thread->kt_ctx.c_kstack;
new_thread->kt_ctx.c_kstacksz = DEFAULT_STACK_SIZE;
- // context_setup(&new_thread->kt_ctx, NULL, 0, NULL, new_thread->kt_kstack,
- // DEFAULT_STACK_SIZE, thr->kt_proc->p_pml4); (done in fork, I hope)
// set the retval, errno, cancelled
new_thread->kt_retval = thr->kt_retval;
@@ -154,7 +152,6 @@ kthread_t *kthread_clone(kthread_t *thr)
list_init(&new_thread->kt_mutexes);
list_link_init(&new_thread->kt_plink);
list_link_init(&new_thread->kt_qlink);
- // list_insert_tail(&thr->kt_proc->p_threads, &new_thread->kt_plink); (done in fork)
return new_thread;
}
diff --git a/kernel/proc/proc.c b/kernel/proc/proc.c
index f7878a2..f13064a 100644
--- a/kernel/proc/proc.c
+++ b/kernel/proc/proc.c
@@ -223,6 +223,9 @@ proc_t *proc_create(const char *name)
proc_initproc = proc;
}
+ proc->p_vmmap = vmmap_clone(curproc->p_vmmap);
+ curproc->p_vmmap->vmm_proc = proc;
+
#ifdef __VFS__
// clone and ref the files from curproc
for (int fd = 0; fd < NFILES; fd++)