[Mammoth] Move Mutex and Semaphore to a separate folder.
This commit is contained in:
parent
ad5b55bf37
commit
f1cbfd18b7
7 changed files with 6 additions and 6 deletions
21
lib/mammoth/sync/mutex.h
Normal file
21
lib/mammoth/sync/mutex.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
class Mutex {
|
||||
public:
|
||||
Mutex(const Mutex&) = delete;
|
||||
Mutex(Mutex&&);
|
||||
Mutex& operator=(Mutex&&);
|
||||
|
||||
static glcr::ErrorOr<Mutex> Create();
|
||||
|
||||
glcr::ErrorCode Lock();
|
||||
glcr::ErrorCode Release();
|
||||
|
||||
private:
|
||||
z_cap_t mutex_cap_;
|
||||
|
||||
Mutex(z_cap_t mutex_cap) : mutex_cap_(mutex_cap) {}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue