Kernel: replace boost::intrusive_ptr with std::shared_ptr
This commit is contained in:
parent
c1de8acfe5
commit
5f11c5f733
96 changed files with 522 additions and 538 deletions
|
@ -16,6 +16,9 @@ class Thread;
|
|||
|
||||
class Mutex final : public WaitObject {
|
||||
public:
|
||||
explicit Mutex(KernelSystem& kernel);
|
||||
~Mutex() override;
|
||||
|
||||
std::string GetTypeName() const override {
|
||||
return "Mutex";
|
||||
}
|
||||
|
@ -28,10 +31,10 @@ public:
|
|||
return HANDLE_TYPE;
|
||||
}
|
||||
|
||||
int lock_count; ///< Number of times the mutex has been acquired
|
||||
u32 priority; ///< The priority of the mutex, used for priority inheritance.
|
||||
std::string name; ///< Name of mutex (optional)
|
||||
SharedPtr<Thread> holding_thread; ///< Thread that has acquired the mutex
|
||||
int lock_count; ///< Number of times the mutex has been acquired
|
||||
u32 priority; ///< The priority of the mutex, used for priority inheritance.
|
||||
std::string name; ///< Name of mutex (optional)
|
||||
std::shared_ptr<Thread> holding_thread; ///< Thread that has acquired the mutex
|
||||
|
||||
/**
|
||||
* Elevate the mutex priority to the best priority
|
||||
|
@ -42,7 +45,7 @@ public:
|
|||
bool ShouldWait(Thread* thread) const override;
|
||||
void Acquire(Thread* thread) override;
|
||||
|
||||
void AddWaitingThread(SharedPtr<Thread> thread) override;
|
||||
void AddWaitingThread(std::shared_ptr<Thread> thread) override;
|
||||
void RemoveWaitingThread(Thread* thread) override;
|
||||
|
||||
/**
|
||||
|
@ -53,10 +56,6 @@ public:
|
|||
ResultCode Release(Thread* thread);
|
||||
|
||||
private:
|
||||
explicit Mutex(KernelSystem& kernel);
|
||||
~Mutex() override;
|
||||
|
||||
friend class KernelSystem;
|
||||
KernelSystem& kernel;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue