pm: use fixed-sized buf + scoped lock (gcc 8.3 compat)

This commit is contained in:
Michael Scire 2019-03-25 17:12:19 -07:00
parent f4950ff26e
commit 3316820f86
7 changed files with 118 additions and 94 deletions

View file

@ -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();
}
};