Kernel: pass ref in Mutex

This commit is contained in:
Weiyi Wang 2018-10-11 16:00:09 -04:00
parent eec11a94cb
commit 7449ba85a6
9 changed files with 27 additions and 22 deletions

View file

@ -24,11 +24,11 @@ void ReleaseThreadMutexes(Thread* thread) {
thread->held_mutexes.clear();
}
Mutex::Mutex() {}
Mutex::Mutex(KernelSystem& kernel) {}
Mutex::~Mutex() {}
SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) {
SharedPtr<Mutex> mutex(new Mutex);
SharedPtr<Mutex> KernelSystem::CreateMutex(bool initial_locked, std::string name) {
SharedPtr<Mutex> mutex(new Mutex(*this));
mutex->lock_count = 0;
mutex->name = std::move(name);