firmware/src/concurrency/LockGuard.h

22 lines
308 B
C
Raw Normal View History

#pragma once
#include "Lock.h"
namespace concurrency {
// RAII lock guard.
class LockGuard
{
public:
LockGuard(Lock *lock);
~LockGuard();
LockGuard(const LockGuard &) = delete;
LockGuard &operator=(const LockGuard &) = delete;
private:
Lock *lock;
};
} // namespace concurrency