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 SOLIDSYSLOGPOSIXMUTEXPRIVATE_H
6 : #define SOLIDSYSLOGPOSIXMUTEXPRIVATE_H
7 :
8 : #include <stdint.h>
9 :
10 : #include <pthread.h>
11 :
12 : #include "SolidSyslogError.h"
13 : #include "SolidSyslogMutexDefinition.h"
14 : #include "SolidSyslogPosixMutexErrors.h"
15 : #include "SolidSyslogPrival.h"
16 :
17 : struct SolidSyslogPosixMutex
18 : {
19 : struct SolidSyslogMutex Base;
20 : pthread_mutex_t Mutex;
21 : };
22 :
23 : void SolidSyslogPosixMutex_Initialise(struct SolidSyslogMutex* base);
24 : void SolidSyslogPosixMutex_Cleanup(struct SolidSyslogMutex* base);
25 :
26 11 : static inline void PosixMutex_Report(
27 : enum SolidSyslogSeverity severity,
28 : uint16_t category,
29 : enum SolidSyslogMutexErrors code
30 : )
31 : {
32 11 : SolidSyslog_Error(severity, &SolidSyslogPosixMutexErrorSource, category, (int32_t) code);
33 11 : }
34 :
35 : #endif /* SOLIDSYSLOGPOSIXMUTEXPRIVATE_H */
|