[Zion] Add a mutex object with appropriate syscalls.

This commit is contained in:
Drew Galbraith 2023-10-25 14:47:45 -07:00
parent 4c2237fa72
commit 4c04f9d561
19 changed files with 160 additions and 60 deletions

View file

@ -8,7 +8,7 @@
#include "capability/capability.h"
#include "include/ztypes.h"
#include "lib/mutex.h"
#include "object/mutex.h"
class MessageQueue {
public:
@ -23,7 +23,7 @@ class MessageQueue {
virtual bool empty() = 0;
protected:
Mutex mutex_{"message"};
glcr::RefPtr<Mutex> mutex_ = Mutex::Create();
// FIXME: This maybe shouldn't be shared between classes since the
// SingleMessageQueue should only ever have one blocked thread.
glcr::IntrusiveList<Thread> blocked_threads_;