Kernel address space isolation and make the kernel heap global to all processes.
[lunaix-os.git] / lunaix-os / kernel / sched.c
index ed2cc74a2b02b813d9578d81af5eb36b88774d6c..f4fb021acccfdbf04cc6ab72d936f1202af3cbac 100644 (file)
@@ -32,8 +32,6 @@ void sched_init() {
         .ptable_len = 0,
         .procs_index = 0
     };
-
-    __current = &dummy;
 }
 
 void schedule() {
@@ -61,7 +59,9 @@ void schedule() {
 
     apic_done_servicing();
 
-    asm volatile ("pushl %0\n jmp soft_iret\n"::"r"(&__current->intr_ctx): "memory");
+    asm volatile (
+        "pushl %0\n"
+        "jmp soft_iret\n"::"r"(&__current->intr_ctx): "memory");
 }
 
 pid_t alloc_pid() {