[Yellowstone][Mammoth] Delete unused cpp code.
This commit is contained in:
parent
d58cbed0df
commit
c1db6cb11f
24 changed files with 0 additions and 1590 deletions
|
|
@ -1,31 +0,0 @@
|
|||
#include "sync/mutex.h"
|
||||
|
||||
#include <zcall.h>
|
||||
|
||||
namespace mmth {
|
||||
|
||||
Mutex::Mutex(Mutex&& other) : mutex_cap_(other.mutex_cap_) {
|
||||
other.mutex_cap_ = 0;
|
||||
}
|
||||
|
||||
Mutex& Mutex::operator=(Mutex&& other) {
|
||||
// TODO: Release existing mutex if it exists.
|
||||
mutex_cap_ = other.mutex_cap_;
|
||||
other.mutex_cap_ = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
glcr::ErrorOr<Mutex> Mutex::Create() {
|
||||
z_cap_t mutex_cap;
|
||||
RET_ERR(ZMutexCreate(&mutex_cap));
|
||||
return Mutex(mutex_cap);
|
||||
}
|
||||
|
||||
glcr::ErrorCode Mutex::Lock() {
|
||||
return static_cast<glcr::ErrorCode>(ZMutexLock(mutex_cap_));
|
||||
}
|
||||
glcr::ErrorCode Mutex::Release() {
|
||||
return static_cast<glcr::ErrorCode>(ZMutexRelease(mutex_cap_));
|
||||
}
|
||||
|
||||
} // namespace mmth
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
namespace mmth {
|
||||
|
||||
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) {}
|
||||
};
|
||||
|
||||
} // namespace mmth
|
||||
Loading…
Add table
Add a link
Reference in a new issue