Selaa lähdekoodia

fix: mark kstack as allocated

greatbridf 2 vuotta sitten
vanhempi
commit
a3d94d13c1
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/kernel/process.cpp

+ 2 - 0
src/kernel/process.cpp

@@ -56,6 +56,8 @@ void thread::alloc_kstack(void)
         if (bm_test(__thd::__kstack_bmp, i) == 0) {
             pkstack = 0xffc00000 + THREAD_KERNEL_STACK_SIZE * (i + 1);
             esp = reinterpret_cast<uint32_t*>(pkstack);
+
+            bm_set(__thd::__kstack_bmp, i);
             return;
         }
     }