mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-13 01:55:59 +00:00
28 lines
386 B
C++
28 lines
386 B
C++
#ifndef STA_ATOMIC_SIGNAL_HPP
|
|
#define STA_ATOMIC_SIGNAL_HPP
|
|
|
|
#include <sta/signal.hpp>
|
|
|
|
#include <atomic>
|
|
|
|
|
|
namespace sta
|
|
{
|
|
class AtomicSignal : public Signal
|
|
{
|
|
public:
|
|
AtomicSignal();
|
|
|
|
void notify() override;
|
|
bool peek() override;
|
|
bool test() override;
|
|
void wait() override;
|
|
|
|
private:
|
|
std::atomic<bool> signal_;
|
|
};
|
|
} // namespace sta
|
|
|
|
|
|
#endif // STA_ATOMIC_SIGNAL_HPP
|