[zion] Add a thread wait syscall

This commit is contained in:
Drew Galbraith 2023-06-22 02:17:50 -07:00
parent f0e8ce14a4
commit 36d82370c1
9 changed files with 45 additions and 8 deletions

View file

@ -48,6 +48,8 @@ class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
void SetState(State state) { state_ = state; }
void Exit();
void Wait();
private:
friend class glcr::MakeRefCountedFriend<Thread>;
Thread(Process& proc, uint64_t tid);
@ -68,4 +70,6 @@ class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
// Stack pointer to take when returning from userspace.
// I don't think me mind clobbering the stack here.
uint64_t rsp0_start_;
glcr::IntrusiveList<Thread> blocked_threads_;
};