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

This commit is contained in:
Michael Scire committed 2019-03-25 17:12:19 -07:00
1 parent f4950ff26e
commit 3316820f86
7 files changed
+117 -93

No files matched your search

+15 -3
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();
}
};