[kernel] Clean up threads' kernel stacks on exit

Add a destructor to threads in order to deallocate their kernel stacks.
This commit is contained in:
2020-07-30 19:32:31 -07:00
parent 3f137805bc
commit 4ffd4949ca
2 changed files with 8 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ public:
/// Get the pointer to the thread object containing this TCB
static thread * from_tcb(TCB *tcb);
/// Destructor
virtual ~thread();
/// Get the `ready` state of the thread.
/// \returns True if the thread is ready to execute.
inline bool ready() const { return has_state(state::ready); }