[Zion] Add a mutex object with appropriate syscalls.
This commit is contained in:
parent
4c2237fa72
commit
4c04f9d561
19 changed files with 160 additions and 60 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <glacier/memory/ref_ptr.h>
|
||||
|
||||
#include "capability/capability.h"
|
||||
#include "lib/mutex.h"
|
||||
#include "object/mutex.h"
|
||||
|
||||
class CapabilityTable {
|
||||
public:
|
||||
|
|
@ -25,7 +25,7 @@ class CapabilityTable {
|
|||
glcr::RefPtr<Capability> ReleaseCapability(uint64_t id);
|
||||
|
||||
private:
|
||||
Mutex lock_{"cap table"};
|
||||
glcr::RefPtr<Mutex> lock_ = Mutex::Create();
|
||||
// TODO: Do some randomization.
|
||||
uint64_t next_cap_id_ = 0x100;
|
||||
// FIXME: use a map data structure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue