oscourse-tsinghua / rcore_plus

Rust version of THU uCore OS. Linux compatible.
MIT License
172 stars 26 forks source link

Recycle tid on sys_wait4 #25

Closed jiegec closed 5 years ago

jiegec commented 5 years ago

Possible solutions:

  1. Quit whole process when main thread exits.
  2. Never recycle tid until whole process exits.
  3. Only recycle non-main thread before process exits, and recycle main thread id upon sys_wait.
wangrunji0408 commented 5 years ago
  1. Detach pid and tid. Recycle tid once the thread exits. (?)
wangrunji0408 commented 5 years ago

Current solution (No.4):