Fix indentation. Update doxygen comments

This commit is contained in:
Henrik Stickann
2023-02-02 22:22:14 +01:00
parent fc4eed38d5
commit 59585b2ae5
46 changed files with 2020 additions and 1960 deletions

View File

@@ -8,11 +8,13 @@
#ifndef STA_CORE_ATOMIC_MUTEX_HPP
#define STA_CORE_ATOMIC_MUTEX_HPP
#include <sta/config.hpp>
#ifdef STA_STDLIB_HAS_ATOMIC
# define STA_ATOMIC_ENABLED
#endif // STA_STDLIB_HAS_ATOMIC
#if defined(STA_ATOMIC_ENABLED) || defined(DOXYGEN)
#include <sta/mutex.hpp>
@@ -22,20 +24,20 @@
namespace sta
{
/**
* @brief Implementation of `Mutex` interface using `std::atomic_flag`.
*/
class AtomicMutex : public Mutex
{
public:
AtomicMutex();
/**
* @brief Implementation of `Mutex` interface using `std::atomic_flag`.
*/
class AtomicMutex : public Mutex
{
public:
AtomicMutex();
void acquire() override;
void release() override;
void acquire() override;
void release() override;
private:
std::atomic_flag lock_; /**< Atomic flag used as lock */
};
private:
std::atomic_flag lock_; /**< Atomic flag used as lock */
};
} // namespace sta

View File

@@ -8,11 +8,13 @@
#ifndef STA_CORE_ATOMIC_SIGNAL_HPP
#define STA_CORE_ATOMIC_SIGNAL_HPP
#include <sta/config.hpp>
#ifdef STA_STDLIB_HAS_ATOMIC
# define STA_ATOMIC_ENABLED
#endif // STA_STDLIB_HAS_ATOMIC
#if defined(STA_ATOMIC_ENABLED) || defined(DOXYGEN)
#include <sta/signal.hpp>
@@ -22,22 +24,22 @@
namespace sta
{
/**
* @brief Implementation of `Signal` interface using `std::atomic`.
*/
class AtomicSignal : public Signal
{
public:
AtomicSignal();
/**
* @brief Implementation of `Signal` interface using `std::atomic`.
*/
class AtomicSignal : public Signal
{
public:
AtomicSignal();
void notify() override;
bool peek() override;
bool test() override;
void wait() override;
void notify() override;
bool peek() override;
bool test() override;
void wait() override;
private:
std::atomic<bool> signal_; /**< Atomic bool used as signal */
};
private:
std::atomic<bool> signal_; /**< Atomic bool used as signal */
};
} // namespace sta