mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
pm: use fixed-sized buf + scoped lock (gcc 8.3 compat)
This commit is contained in:
parent
f4950ff26e
commit
3316820f86
7 changed files with 118 additions and 94 deletions
|
@ -44,12 +44,24 @@ class ProcessWaiter final : public IWaitable {
|
|||
|
||||
class ProcessList final {
|
||||
private:
|
||||
HosRecursiveMutex mutex;
|
||||
HosRecursiveMutex m;
|
||||
|
||||
HosRecursiveMutex *GetMutex() {
|
||||
return &this->m;
|
||||
}
|
||||
public:
|
||||
std::vector<std::shared_ptr<Registration::Process>> processes;
|
||||
|
||||
auto GetUniqueLock() {
|
||||
return std::unique_lock{this->mutex};
|
||||
void lock() {
|
||||
GetMutex()->lock();
|
||||
}
|
||||
|
||||
void unlock() {
|
||||
GetMutex()->unlock();
|
||||
}
|
||||
|
||||
void try_lock() {
|
||||
GetMutex()->try_lock();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue