diff src/proc.cbc @ 360:3d7e1c9a852e

...
author anatofuz
date Fri, 26 Jun 2020 15:30:42 +0900
parents ee19f903218a
children 650fac123133
line wrap: on
line diff
--- a/src/proc.cbc	Tue Jun 23 12:17:25 2020 +0900
+++ b/src/proc.cbc	Fri Jun 26 15:30:42 2020 +0900
@@ -8,6 +8,8 @@
 #include "spinlock.h"
 #interface "vm.h"
 
+#include "kernel.h"
+
 #define __ncode __code
 
 //
@@ -141,6 +143,7 @@
 
     p = allocproc();
     initContext(&p->cbc_context);
+    p->cbc_context.kernel_context = kernel_context;
 
     initproc = p;
 
@@ -219,6 +222,7 @@
         return -1;
     }
     initContext(&np->cbc_context);
+    np->cbc_context.kernel_context = kernel_context;
 
     // Copy process state from p.
     if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){