sta-core/include/sta/mutex.hpp
2022-04-09 21:21:21 +02:00

28 lines
422 B
C++

#ifndef STA_MUTEX_HPP
#define STA_MUTEX_HPP
namespace sta
{
/**
* @brief Interface for mutex objects.
*/
class Mutex
{
public:
/**
* @brief Block until mutex has been acquired
*/
virtual void acquire() = 0;
/**
* @brief Release mutex
*/
virtual void release() = 0;
static Mutex * ALWAYS_FREE; /**< Fake mutex that can always be acquired */
};
} // namespace sta
#endif // STA_MUTEX_HPP