mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 16:55:58 +00:00
34 lines
601 B
C++
34 lines
601 B
C++
/**
|
|
* @file
|
|
* @brief Mutex interface definition.
|
|
*/
|
|
#ifndef STA_CORE_MUTEX_HPP
|
|
#define STA_CORE_MUTEX_HPP
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @brief Interface for mutex objects.
|
|
*
|
|
* @ingroup sta_core
|
|
*/
|
|
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_CORE_MUTEX_HPP
|