Line data Source code
1 : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
2 : * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
3 : */
4 :
5 : #ifndef SOLIDSYSLOGSTDATOMICCOUNTERPRIVATE_H
6 : #define SOLIDSYSLOGSTDATOMICCOUNTERPRIVATE_H
7 :
8 : #include <stdatomic.h>
9 : #include <stdint.h>
10 :
11 : #include "SolidSyslogAtomicCounterDefinition.h"
12 : #include "SolidSyslogError.h"
13 : #include "SolidSyslogPrival.h"
14 : #include "SolidSyslogStdAtomicCounterErrors.h"
15 :
16 : struct SolidSyslogStdAtomicCounter
17 : {
18 : struct SolidSyslogAtomicCounter Base;
19 : _Atomic uint32_t Value;
20 : };
21 :
22 : void SolidSyslogStdAtomicCounter_Initialise(struct SolidSyslogAtomicCounter* base);
23 : void SolidSyslogStdAtomicCounter_Cleanup(struct SolidSyslogAtomicCounter* base);
24 :
25 11 : static inline void StdAtomicCounter_Report(
26 : enum SolidSyslogSeverity severity,
27 : uint16_t category,
28 : enum SolidSyslogAtomicCounterErrors code
29 : )
30 : {
31 11 : SolidSyslog_Error(severity, &SolidSyslogStdAtomicCounterErrorSource, category, (int32_t) code);
32 11 : }
33 :
34 : #endif /* SOLIDSYSLOGSTDATOMICCOUNTERPRIVATE_H */
|