Browse Source

Do not unmap stack while it is being used, add a comment to fix it later

Jeremy Soller 4 years ago
parent
commit
36bb60cacc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/platform/pte.rs

+ 2 - 1
src/platform/pte.rs

@@ -225,7 +225,8 @@ pub unsafe extern "C" fn pte_osThreadDelete(handle: pte_osThreadHandle) -> pte_o
     pte_osMutexLock(&mut pid_stacks_lock);
     if let Some(ref mut stacks) = pid_stacks {
         if let Some((stack_base, stack_size)) = stacks.remove(&handle) {
-            sys_mman::munmap(stack_base, stack_size);
+            //TODO: this currently unmaps the thread's stack, while it is being used!
+            //sys_mman::munmap(stack_base, stack_size);
         }
     }
     pte_osMutexUnlock(&mut pid_stacks_lock);