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

@ -16,14 +16,6 @@ class Thread;
class Mutex final : public WaitObject {
public:
/**
* Creates a mutex.
* @param initial_locked Specifies if the mutex should be locked initially
* @param name Optional name of mutex
* @return Pointer to new Mutex object
*/
static SharedPtr<Mutex> Create(bool initial_locked, std::string name = "Unknown");
std::string GetTypeName() const override {
return "Mutex";
}
@ -61,8 +53,10 @@ public:
ResultCode Release(Thread* thread);
private:
Mutex();
explicit Mutex(KernelSystem& kernel);
~Mutex() override;
friend class KernelSystem;
};
/**