rcore-os / rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
https://rcore-os.github.io/rCore-Tutorial-Book-v3/index.html
GNU General Public License v3.0
1.58k stars 452 forks source link

bugfix #144: Do not free kstack when the main thread exits #146

Closed wyfcyx closed 6 months ago

wyfcyx commented 6 months ago

When the main thread exits, we do not free its kstack since it is still being used before sched. It will be freed when the whole process is reaped by the parent process.