From 1f8f4d79811949a668224eb309c92acee9d0db4e Mon Sep 17 00:00:00 2001 From: David Cozens Date: Mon, 10 Aug 2026 19:41:58 +0100 Subject: [PATCH 1/3] refactor!: name platform callbacks for what they supply The platform token becomes the class and the function names what it fills, matching the SolidSyslogConfig field it is assigned to. A bare _Get passes the naming regex while carrying no meaning, and Sleep had no function part at all. No compatibility alias: an old name fails to compile rather than working quietly. The rule is written into docs/NAMING.md so it stops being implicit. Co-Authored-By: Claude Opus 5 (1M context) --- .../Common/BddTargetFreeRtosPipeline.c | 2 +- .../BddTargetTlsSender_OpenSsl_PosixTcp.c | 2 +- .../BddTargetTlsSender_OpenSsl_WinsockTcp.c | 2 +- Bdd/Targets/Linux/main.c | 10 +++---- Bdd/Targets/Windows/BddTargetWindows.c | 10 +++---- .../Interface/SolidSyslogFreeRtosSysUpTime.h | 2 +- .../Source/SolidSyslogFreeRtosSysUpTime.c | 2 +- .../Posix/Interface/SolidSyslogPosixClock.h | 2 +- .../Interface/SolidSyslogPosixHostname.h | 2 +- .../Interface/SolidSyslogPosixProcessId.h | 2 +- .../Posix/Interface/SolidSyslogPosixSleep.h | 2 +- .../Interface/SolidSyslogPosixSysUpTime.h | 2 +- Platform/Posix/Source/SolidSyslogPosixClock.c | 2 +- .../Posix/Source/SolidSyslogPosixHostname.c | 2 +- .../Posix/Source/SolidSyslogPosixProcessId.c | 2 +- Platform/Posix/Source/SolidSyslogPosixSleep.c | 2 +- .../Posix/Source/SolidSyslogPosixSysUpTime.c | 2 +- .../Interface/SolidSyslogWindowsClock.h | 2 +- .../Interface/SolidSyslogWindowsFile.h | 4 ++- .../Interface/SolidSyslogWindowsHostname.h | 2 +- .../Interface/SolidSyslogWindowsProcessId.h | 2 +- .../Interface/SolidSyslogWindowsSleep.h | 5 ++-- .../Interface/SolidSyslogWindowsSysUpTime.h | 2 +- .../Windows/Source/SolidSyslogWindowsClock.c | 2 +- .../Source/SolidSyslogWindowsHostname.c | 2 +- .../Source/SolidSyslogWindowsProcessId.c | 2 +- .../Windows/Source/SolidSyslogWindowsSleep.c | 2 +- .../Source/SolidSyslogWindowsSysUpTime.c | 2 +- .../SolidSyslogFreeRtosSysUpTimeTest.cpp | 8 +++--- Tests/SolidSyslogPosixClockTest.cpp | 2 +- Tests/SolidSyslogPosixSleepTest.cpp | 6 ++-- Tests/SolidSyslogPosixSysUpTimeTest.cpp | 14 +++++----- Tests/SolidSyslogWindowsClockTest.cpp | 2 +- Tests/SolidSyslogWindowsHostnameTest.cpp | 8 +++--- Tests/SolidSyslogWindowsProcessIdTest.cpp | 6 ++-- Tests/SolidSyslogWindowsSleepTest.cpp | 6 ++-- Tests/SolidSyslogWindowsSysUpTimeTest.cpp | 12 ++++---- docs/NAMING.md | 28 +++++++++++++++++++ docs/hardening-path.md | 2 +- docs/platforms/posix/setup.md | 2 +- docs/platforms/windows/setup.md | 4 +-- 41 files changed, 104 insertions(+), 73 deletions(-) diff --git a/Bdd/Targets/Common/BddTargetFreeRtosPipeline.c b/Bdd/Targets/Common/BddTargetFreeRtosPipeline.c index cda2962d..8c2adb80 100644 --- a/Bdd/Targets/Common/BddTargetFreeRtosPipeline.c +++ b/Bdd/Targets/Common/BddTargetFreeRtosPipeline.c @@ -750,7 +750,7 @@ void BddTargetFreeRtosPipeline_InteractiveTask(void* argument) atomicCounter = SolidSyslogStdAtomicCounter_Create(); struct SolidSyslogMetaSdConfig metaConfig = { .Counter = atomicCounter, - .GetSysUpTime = SolidSyslogFreeRtosSysUpTime_Get, + .GetSysUpTime = SolidSyslogFreeRtos_GetSysUpTime, .GetLanguage = BddTargetLanguage_Get, }; metaSd = SolidSyslogMetaSd_Create(&metaConfig); diff --git a/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_PosixTcp.c b/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_PosixTcp.c index c74e1058..b9c7c7a1 100644 --- a/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_PosixTcp.c +++ b/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_PosixTcp.c @@ -25,7 +25,7 @@ struct SolidSyslogSender* BddTargetTlsSender_Create(struct SolidSyslogResolver* static struct SolidSyslogOpenSslStreamConfig tlsStreamConfig; tlsStreamConfig = (struct SolidSyslogOpenSslStreamConfig) {0}; tlsStreamConfig.Transport = underlyingStream; - tlsStreamConfig.Sleep = SolidSyslogPosixSleep; + tlsStreamConfig.Sleep = SolidSyslogPosix_Sleep; if (mtls) { tlsStreamConfig.CaBundlePath = BddTargetMtlsConfig_GetCaBundlePath(); diff --git a/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c b/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c index 7d2c108d..9368108a 100644 --- a/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c +++ b/Bdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.c @@ -24,7 +24,7 @@ struct SolidSyslogSender* BddTargetTlsSender_Create(struct SolidSyslogResolver* static struct SolidSyslogOpenSslStreamConfig tlsStreamConfig; tlsStreamConfig = (struct SolidSyslogOpenSslStreamConfig) {0}; tlsStreamConfig.Transport = underlyingStream; - tlsStreamConfig.Sleep = SolidSyslogWindowsSleep; + tlsStreamConfig.Sleep = SolidSyslogWindows_Sleep; if (mtls) { tlsStreamConfig.CaBundlePath = BddTargetMtlsConfig_GetCaBundlePath(); diff --git a/Bdd/Targets/Linux/main.c b/Bdd/Targets/Linux/main.c index aab639a8..594610f7 100644 --- a/Bdd/Targets/Linux/main.c +++ b/Bdd/Targets/Linux/main.c @@ -83,7 +83,7 @@ static struct SolidSyslog* solidSyslog; static void* ServiceThreadEntry(void* arg) { volatile bool* shutdown = (volatile bool*) arg; - BddTargetServiceThread_Run(solidSyslog, shutdown, SolidSyslogPosixSleep); + BddTargetServiceThread_Run(solidSyslog, shutdown, SolidSyslogPosix_Sleep); return NULL; } @@ -314,7 +314,7 @@ int main(int argc, char* argv[]) struct SolidSyslogAtomicCounter* counter = SolidSyslogStdAtomicCounter_Create(); struct SolidSyslogMetaSdConfig metaConfig = { .Counter = counter, - .GetSysUpTime = SolidSyslogPosixSysUpTime_Get, + .GetSysUpTime = SolidSyslogPosix_GetSysUpTime, .GetLanguage = BddTargetLanguage_Get, }; struct SolidSyslogStructuredData* metaSd = SolidSyslogMetaSd_Create(&metaConfig); @@ -335,10 +335,10 @@ int main(int argc, char* argv[]) struct SolidSyslogConfig config = { .Buffer = buffer, .Sender = sender, - .Clock = SolidSyslogPosixClock_GetTimestamp, - .GetHostname = SolidSyslogPosixHostname_Get, + .Clock = SolidSyslogPosix_GetTimestamp, + .GetHostname = SolidSyslogPosix_GetHostname, .GetAppName = BddTargetAppName_Get, - .GetProcessId = SolidSyslogPosixProcessId_Get, + .GetProcessId = SolidSyslogPosix_GetProcessId, .Store = store, .Sd = sdList, .SdCount = sdCount, diff --git a/Bdd/Targets/Windows/BddTargetWindows.c b/Bdd/Targets/Windows/BddTargetWindows.c index 82df38a9..1037b8fe 100644 --- a/Bdd/Targets/Windows/BddTargetWindows.c +++ b/Bdd/Targets/Windows/BddTargetWindows.c @@ -93,7 +93,7 @@ static struct SolidSyslogSecurityPolicy* securityPolicy; // NOLINTNEXTLINE(readability-non-const-parameter) -- _beginthreadex thread-entry signature requires void* static unsigned __stdcall ServiceThreadEntry(void* arg) { - BddTargetServiceThread_Run(solidSyslog, (volatile bool*) arg, SolidSyslogWindowsSleep); + BddTargetServiceThread_Run(solidSyslog, (volatile bool*) arg, SolidSyslogWindows_Sleep); return 0; } @@ -371,7 +371,7 @@ int BddTargetWindows_Run(int argc, char* argv[]) struct SolidSyslogAtomicCounter* counter = SolidSyslogWindowsAtomicCounter_Create(); struct SolidSyslogMetaSdConfig metaConfig = { .Counter = counter, - .GetSysUpTime = SolidSyslogWindowsSysUpTime_Get, + .GetSysUpTime = SolidSyslogWindows_GetSysUpTime, .GetLanguage = BddTargetLanguage_Get, }; struct SolidSyslogStructuredData* metaSd = SolidSyslogMetaSd_Create(&metaConfig); @@ -395,10 +395,10 @@ int BddTargetWindows_Run(int argc, char* argv[]) struct SolidSyslogConfig config = { .Buffer = buffer, .Sender = sender, - .Clock = SolidSyslogWindowsClock_GetTimestamp, - .GetHostname = SolidSyslogWindowsHostname_Get, + .Clock = SolidSyslogWindows_GetTimestamp, + .GetHostname = SolidSyslogWindows_GetHostname, .GetAppName = BddTargetAppName_Get, - .GetProcessId = SolidSyslogWindowsProcessId_Get, + .GetProcessId = SolidSyslogWindows_GetProcessId, .Store = store, .Sd = sdList, .SdCount = sdCount, diff --git a/Platform/FreeRtos/Interface/SolidSyslogFreeRtosSysUpTime.h b/Platform/FreeRtos/Interface/SolidSyslogFreeRtosSysUpTime.h index 65d3c3a8..4a1c1073 100644 --- a/Platform/FreeRtos/Interface/SolidSyslogFreeRtosSysUpTime.h +++ b/Platform/FreeRtos/Interface/SolidSyslogFreeRtosSysUpTime.h @@ -20,7 +20,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN * A 16-bit tick counter, or a 32-bit rate that does not divide 100 * (including any rate above 100 Hz), fails to build (widen the tick type, * pick a dividing rate, or supply your own SolidSyslogSysUpTimeFunction). */ - uint32_t SolidSyslogFreeRtosSysUpTime_Get(void); + uint32_t SolidSyslogFreeRtos_GetSysUpTime(void); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/FreeRtos/Source/SolidSyslogFreeRtosSysUpTime.c b/Platform/FreeRtos/Source/SolidSyslogFreeRtosSysUpTime.c index 1ad37a13..ab5ef0ad 100644 --- a/Platform/FreeRtos/Source/SolidSyslogFreeRtosSysUpTime.c +++ b/Platform/FreeRtos/Source/SolidSyslogFreeRtosSysUpTime.c @@ -29,7 +29,7 @@ SOLIDSYSLOG_STATIC_ASSERT( "SolidSyslogSysUpTimeFunction." ); -uint32_t SolidSyslogFreeRtosSysUpTime_Get(void) +uint32_t SolidSyslogFreeRtos_GetSysUpTime(void) { /* Divide the tick count down before scaling by 100 so the intermediate * cannot overflow even a 64-bit TickType_t; the whole/remainder split is diff --git a/Platform/Posix/Interface/SolidSyslogPosixClock.h b/Platform/Posix/Interface/SolidSyslogPosixClock.h index 3015a7db..28f06602 100644 --- a/Platform/Posix/Interface/SolidSyslogPosixClock.h +++ b/Platform/Posix/Interface/SolidSyslogPosixClock.h @@ -10,7 +10,7 @@ struct SolidSyslogTimestamp; SOLIDSYSLOG_EXTERN_C_BEGIN /** Fills @p timestamp from the system real-time clock (CLOCK_REALTIME). */ - void SolidSyslogPosixClock_GetTimestamp(struct SolidSyslogTimestamp * timestamp); + void SolidSyslogPosix_GetTimestamp(struct SolidSyslogTimestamp * timestamp); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Posix/Interface/SolidSyslogPosixHostname.h b/Platform/Posix/Interface/SolidSyslogPosixHostname.h index e2fa8f50..0e64d22b 100644 --- a/Platform/Posix/Interface/SolidSyslogPosixHostname.h +++ b/Platform/Posix/Interface/SolidSyslogPosixHostname.h @@ -11,7 +11,7 @@ struct SolidSyslogHeaderField; SOLIDSYSLOG_EXTERN_C_BEGIN /** Writes the host's name (gethostname) into @p field. @p context is unused. */ - void SolidSyslogPosixHostname_Get(struct SolidSyslogHeaderField * field, void* context); + void SolidSyslogPosix_GetHostname(struct SolidSyslogHeaderField * field, void* context); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Posix/Interface/SolidSyslogPosixProcessId.h b/Platform/Posix/Interface/SolidSyslogPosixProcessId.h index 9c58e74c..a7d445a8 100644 --- a/Platform/Posix/Interface/SolidSyslogPosixProcessId.h +++ b/Platform/Posix/Interface/SolidSyslogPosixProcessId.h @@ -11,7 +11,7 @@ struct SolidSyslogHeaderField; SOLIDSYSLOG_EXTERN_C_BEGIN /** Writes the process id (getpid) into @p field. @p context is unused. */ - void SolidSyslogPosixProcessId_Get(struct SolidSyslogHeaderField * field, void* context); + void SolidSyslogPosix_GetProcessId(struct SolidSyslogHeaderField * field, void* context); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Posix/Interface/SolidSyslogPosixSleep.h b/Platform/Posix/Interface/SolidSyslogPosixSleep.h index 3f50b3b0..49576f0a 100644 --- a/Platform/Posix/Interface/SolidSyslogPosixSleep.h +++ b/Platform/Posix/Interface/SolidSyslogPosixSleep.h @@ -10,7 +10,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Sleeps for @p milliseconds via nanosleep. It neither performs nor bounds * retries; callers such as the TLS handshake use it to yield between their own * bounded attempts. */ - void SolidSyslogPosixSleep(int milliseconds); + void SolidSyslogPosix_Sleep(int milliseconds); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Posix/Interface/SolidSyslogPosixSysUpTime.h b/Platform/Posix/Interface/SolidSyslogPosixSysUpTime.h index 3d9bc7f9..95954604 100644 --- a/Platform/Posix/Interface/SolidSyslogPosixSysUpTime.h +++ b/Platform/Posix/Interface/SolidSyslogPosixSysUpTime.h @@ -12,7 +12,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Hundredths of a second since boot from CLOCK_BOOTTIME, as RFC 3418 * sysUpTime; wraps modulo 2^32 per the TimeTicks contract. Returns 0 if the * clock read fails. */ - uint32_t SolidSyslogPosixSysUpTime_Get(void); + uint32_t SolidSyslogPosix_GetSysUpTime(void); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Posix/Source/SolidSyslogPosixClock.c b/Platform/Posix/Source/SolidSyslogPosixClock.c index cdd4a858..8e9fc245 100644 --- a/Platform/Posix/Source/SolidSyslogPosixClock.c +++ b/Platform/Posix/Source/SolidSyslogPosixClock.c @@ -16,7 +16,7 @@ static inline void PosixClock_PopulateTimestamp( const struct tm* breakdown ); -void SolidSyslogPosixClock_GetTimestamp(struct SolidSyslogTimestamp* timestamp) +void SolidSyslogPosix_GetTimestamp(struct SolidSyslogTimestamp* timestamp) { struct timespec now; struct tm breakdown; diff --git a/Platform/Posix/Source/SolidSyslogPosixHostname.c b/Platform/Posix/Source/SolidSyslogPosixHostname.c index 93a49138..eaed86d8 100644 --- a/Platform/Posix/Source/SolidSyslogPosixHostname.c +++ b/Platform/Posix/Source/SolidSyslogPosixHostname.c @@ -11,7 +11,7 @@ enum MAX_HOSTNAME_SIZE = 256U }; -void SolidSyslogPosixHostname_Get(struct SolidSyslogHeaderField* field, void* context) +void SolidSyslogPosix_GetHostname(struct SolidSyslogHeaderField* field, void* context) { char hostname[MAX_HOSTNAME_SIZE]; diff --git a/Platform/Posix/Source/SolidSyslogPosixProcessId.c b/Platform/Posix/Source/SolidSyslogPosixProcessId.c index 0e437309..e59bb345 100644 --- a/Platform/Posix/Source/SolidSyslogPosixProcessId.c +++ b/Platform/Posix/Source/SolidSyslogPosixProcessId.c @@ -7,7 +7,7 @@ struct SolidSyslogHeaderField; -void SolidSyslogPosixProcessId_Get(struct SolidSyslogHeaderField* field, void* context) +void SolidSyslogPosix_GetProcessId(struct SolidSyslogHeaderField* field, void* context) { (void) context; SolidSyslogHeaderField_Uint32(field, (uint32_t) getpid()); diff --git a/Platform/Posix/Source/SolidSyslogPosixSleep.c b/Platform/Posix/Source/SolidSyslogPosixSleep.c index 2865953f..1dcc1490 100644 --- a/Platform/Posix/Source/SolidSyslogPosixSleep.c +++ b/Platform/Posix/Source/SolidSyslogPosixSleep.c @@ -8,7 +8,7 @@ enum NANOSECONDS_PER_MILLISECOND = 1000000L }; -void SolidSyslogPosixSleep(int milliseconds) +void SolidSyslogPosix_Sleep(int milliseconds) { struct timespec ts = { .tv_sec = milliseconds / MILLISECONDS_PER_SECOND, diff --git a/Platform/Posix/Source/SolidSyslogPosixSysUpTime.c b/Platform/Posix/Source/SolidSyslogPosixSysUpTime.c index 664b7ab6..56cb3e51 100644 --- a/Platform/Posix/Source/SolidSyslogPosixSysUpTime.c +++ b/Platform/Posix/Source/SolidSyslogPosixSysUpTime.c @@ -8,7 +8,7 @@ enum NANOSECONDS_PER_HUNDREDTH = 10000000 }; -uint32_t SolidSyslogPosixSysUpTime_Get(void) +uint32_t SolidSyslogPosix_GetSysUpTime(void) { struct timespec now; uint32_t result = 0; diff --git a/Platform/Windows/Interface/SolidSyslogWindowsClock.h b/Platform/Windows/Interface/SolidSyslogWindowsClock.h index 902e1229..8bd79691 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsClock.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsClock.h @@ -9,7 +9,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Fills @p timestamp from the system wall clock (GetSystemTimeAsFileTime), * broken down to UTC calendar fields with microsecond precision. */ - void SolidSyslogWindowsClock_GetTimestamp(struct SolidSyslogTimestamp * timestamp); + void SolidSyslogWindows_GetTimestamp(struct SolidSyslogTimestamp * timestamp); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Windows/Interface/SolidSyslogWindowsFile.h b/Platform/Windows/Interface/SolidSyslogWindowsFile.h index cdbdec47..80dfcae9 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsFile.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsFile.h @@ -4,7 +4,9 @@ * or Store. * * Files open in binary mode (_O_BINARY) so the CRT's CR/LF translation never - * corrupts arbitrary bytes — BlockStore frames round-trip unchanged. */ + * corrupts arbitrary bytes — BlockStore frames round-trip unchanged. A write is + * not flushed to the medium, so durability past a power cut belongs to the + * volume rather than to this adapter. */ #ifndef SOLIDSYSLOGWINDOWSFILE_H #define SOLIDSYSLOGWINDOWSFILE_H diff --git a/Platform/Windows/Interface/SolidSyslogWindowsHostname.h b/Platform/Windows/Interface/SolidSyslogWindowsHostname.h index ec7fc883..f257caca 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsHostname.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsHostname.h @@ -10,7 +10,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Writes the physical DNS host name (GetComputerNameExA) into @p field. * @p context is unused. */ - void SolidSyslogWindowsHostname_Get(struct SolidSyslogHeaderField * field, void* context); + void SolidSyslogWindows_GetHostname(struct SolidSyslogHeaderField * field, void* context); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Windows/Interface/SolidSyslogWindowsProcessId.h b/Platform/Windows/Interface/SolidSyslogWindowsProcessId.h index 75b00836..7df48e71 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsProcessId.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsProcessId.h @@ -10,7 +10,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Writes the process id (GetCurrentProcessId) into @p field. @p context is * unused. */ - void SolidSyslogWindowsProcessId_Get(struct SolidSyslogHeaderField * field, void* context); + void SolidSyslogWindows_GetProcessId(struct SolidSyslogHeaderField * field, void* context); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Windows/Interface/SolidSyslogWindowsSleep.h b/Platform/Windows/Interface/SolidSyslogWindowsSleep.h index f888ecca..716d6dc7 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsSleep.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsSleep.h @@ -1,5 +1,6 @@ /** @file - * The Windows SolidSyslogSleepFunction. */ + * The Windows SolidSyslogSleepFunction, for the bounded waits a TLS handshake + * or a name-resolution spin needs. */ #ifndef SOLIDSYSLOGWINDOWSSLEEP_H #define SOLIDSYSLOGWINDOWSSLEEP_H @@ -9,7 +10,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Wraps Sleep so a bounded retry loop (e.g. the TLS handshake) yields to the * scheduler between attempts. */ - void SolidSyslogWindowsSleep(int milliseconds); + void SolidSyslogWindows_Sleep(int milliseconds); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Windows/Interface/SolidSyslogWindowsSysUpTime.h b/Platform/Windows/Interface/SolidSyslogWindowsSysUpTime.h index 72be2918..9d1993f8 100644 --- a/Platform/Windows/Interface/SolidSyslogWindowsSysUpTime.h +++ b/Platform/Windows/Interface/SolidSyslogWindowsSysUpTime.h @@ -11,7 +11,7 @@ SOLIDSYSLOG_EXTERN_C_BEGIN /** Hundredths of a second since boot from GetTickCount64, as RFC 3418 * sysUpTime; wraps modulo 2^32 per the TimeTicks contract. */ - uint32_t SolidSyslogWindowsSysUpTime_Get(void); + uint32_t SolidSyslogWindows_GetSysUpTime(void); SOLIDSYSLOG_EXTERN_C_END diff --git a/Platform/Windows/Source/SolidSyslogWindowsClock.c b/Platform/Windows/Source/SolidSyslogWindowsClock.c index f4faef57..5823a9b4 100644 --- a/Platform/Windows/Source/SolidSyslogWindowsClock.c +++ b/Platform/Windows/Source/SolidSyslogWindowsClock.c @@ -31,7 +31,7 @@ static inline void WindowsClock_PopulateTimestamp( uint32_t microseconds ); -void SolidSyslogWindowsClock_GetTimestamp(struct SolidSyslogTimestamp* timestamp) +void SolidSyslogWindows_GetTimestamp(struct SolidSyslogTimestamp* timestamp) { FILETIME fileTime; SYSTEMTIME breakdown; diff --git a/Platform/Windows/Source/SolidSyslogWindowsHostname.c b/Platform/Windows/Source/SolidSyslogWindowsHostname.c index e933b122..f908a620 100644 --- a/Platform/Windows/Source/SolidSyslogWindowsHostname.c +++ b/Platform/Windows/Source/SolidSyslogWindowsHostname.c @@ -20,7 +20,7 @@ enum MAX_HOSTNAME_SIZE = 256U }; -void SolidSyslogWindowsHostname_Get(struct SolidSyslogHeaderField* field, void* context) +void SolidSyslogWindows_GetHostname(struct SolidSyslogHeaderField* field, void* context) { char hostname[MAX_HOSTNAME_SIZE]; DWORD size = sizeof(hostname); diff --git a/Platform/Windows/Source/SolidSyslogWindowsProcessId.c b/Platform/Windows/Source/SolidSyslogWindowsProcessId.c index 8e29d37b..bb53b72f 100644 --- a/Platform/Windows/Source/SolidSyslogWindowsProcessId.c +++ b/Platform/Windows/Source/SolidSyslogWindowsProcessId.c @@ -17,7 +17,7 @@ static DWORD WINAPI WindowsProcessId_CallGetCurrentProcessId(void) return GetCurrentProcessId(); } -void SolidSyslogWindowsProcessId_Get(struct SolidSyslogHeaderField* field, void* context) +void SolidSyslogWindows_GetProcessId(struct SolidSyslogHeaderField* field, void* context) { (void) context; SolidSyslogHeaderField_Uint32(field, (uint32_t) WindowsProcessId_GetCurrentProcessId()); diff --git a/Platform/Windows/Source/SolidSyslogWindowsSleep.c b/Platform/Windows/Source/SolidSyslogWindowsSleep.c index 72faa6df..fecd1bf9 100644 --- a/Platform/Windows/Source/SolidSyslogWindowsSleep.c +++ b/Platform/Windows/Source/SolidSyslogWindowsSleep.c @@ -2,7 +2,7 @@ #include -void SolidSyslogWindowsSleep(int milliseconds) +void SolidSyslogWindows_Sleep(int milliseconds) { Sleep((DWORD) milliseconds); } diff --git a/Platform/Windows/Source/SolidSyslogWindowsSysUpTime.c b/Platform/Windows/Source/SolidSyslogWindowsSysUpTime.c index 9b57ad19..c240d52e 100644 --- a/Platform/Windows/Source/SolidSyslogWindowsSysUpTime.c +++ b/Platform/Windows/Source/SolidSyslogWindowsSysUpTime.c @@ -19,7 +19,7 @@ enum MILLISECONDS_PER_HUNDREDTH = 10 }; -uint32_t SolidSyslogWindowsSysUpTime_Get(void) +uint32_t SolidSyslogWindows_GetSysUpTime(void) { ULONGLONG milliseconds = WindowsSysUpTime_GetTickCount64(); return (uint32_t) (milliseconds / MILLISECONDS_PER_HUNDREDTH); diff --git a/Tests/FreeRtos/SolidSyslogFreeRtosSysUpTimeTest.cpp b/Tests/FreeRtos/SolidSyslogFreeRtosSysUpTimeTest.cpp index 9f206fe7..9a8eb650 100644 --- a/Tests/FreeRtos/SolidSyslogFreeRtosSysUpTimeTest.cpp +++ b/Tests/FreeRtos/SolidSyslogFreeRtosSysUpTimeTest.cpp @@ -21,7 +21,7 @@ TEST(SolidSyslogFreeRtosSysUpTime, ReturnsZeroWhenTicksAreZero) { FreeRtosTaskFake_SetTickCount(0); - UNSIGNED_LONGS_EQUAL(0U, SolidSyslogFreeRtosSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0U, SolidSyslogFreeRtos_GetSysUpTime()); } TEST(SolidSyslogFreeRtosSysUpTime, ReturnsOneWhenTicksAreOne) @@ -29,7 +29,7 @@ TEST(SolidSyslogFreeRtosSysUpTime, ReturnsOneWhenTicksAreOne) { FreeRtosTaskFake_SetTickCount(1); - UNSIGNED_LONGS_EQUAL(1U, SolidSyslogFreeRtosSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(1U, SolidSyslogFreeRtos_GetSysUpTime()); } TEST(SolidSyslogFreeRtosSysUpTime, ReturnsTickCountAtMidRange) @@ -37,7 +37,7 @@ TEST(SolidSyslogFreeRtosSysUpTime, ReturnsTickCountAtMidRange) { FreeRtosTaskFake_SetTickCount(12345U); - UNSIGNED_LONGS_EQUAL(12345U, SolidSyslogFreeRtosSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(12345U, SolidSyslogFreeRtos_GetSysUpTime()); } TEST(SolidSyslogFreeRtosSysUpTime, ReturnsUint32MaxWhenTicksAreUint32Max) @@ -45,5 +45,5 @@ TEST(SolidSyslogFreeRtosSysUpTime, ReturnsUint32MaxWhenTicksAreUint32Max) { FreeRtosTaskFake_SetTickCount(UINT32_MAX); - UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogFreeRtosSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogFreeRtos_GetSysUpTime()); } diff --git a/Tests/SolidSyslogPosixClockTest.cpp b/Tests/SolidSyslogPosixClockTest.cpp index 9721c4e1..475c88d7 100644 --- a/Tests/SolidSyslogPosixClockTest.cpp +++ b/Tests/SolidSyslogPosixClockTest.cpp @@ -33,7 +33,7 @@ TEST_GROUP(SolidSyslogPosixClock) static struct SolidSyslogTimestamp getTimestamp() { struct SolidSyslogTimestamp ts = {}; - SolidSyslogPosixClock_GetTimestamp(&ts); + SolidSyslogPosix_GetTimestamp(&ts); return ts; } }; diff --git a/Tests/SolidSyslogPosixSleepTest.cpp b/Tests/SolidSyslogPosixSleepTest.cpp index c23d87a0..6937a45a 100644 --- a/Tests/SolidSyslogPosixSleepTest.cpp +++ b/Tests/SolidSyslogPosixSleepTest.cpp @@ -2,16 +2,16 @@ #include "CppUTest/TestHarness.h" // clang-format off -TEST_GROUP(SolidSyslogPosixSleep) +TEST_GROUP(SolidSyslogPosix_Sleep) { }; // clang-format on -TEST(SolidSyslogPosixSleep, ReturnsImmediatelyForZero) +TEST(SolidSyslogPosix_Sleep, ReturnsImmediatelyForZero) { /* nanosleep with a zero-length duration is a defined no-op return; the test simply pins that the wrapper does not crash and returns under any vaguely reasonable wall-clock budget. Sub-millisecond completion is the expected behaviour on every supported POSIX platform. */ - SolidSyslogPosixSleep(0); + SolidSyslogPosix_Sleep(0); } diff --git a/Tests/SolidSyslogPosixSysUpTimeTest.cpp b/Tests/SolidSyslogPosixSysUpTimeTest.cpp index 76f7e16b..cd6fe7c3 100644 --- a/Tests/SolidSyslogPosixSysUpTimeTest.cpp +++ b/Tests/SolidSyslogPosixSysUpTimeTest.cpp @@ -18,44 +18,44 @@ TEST_GROUP(SolidSyslogPosixSysUpTime) TEST(SolidSyslogPosixSysUpTime, ZeroSecondsAndZeroNanosecondsReturnsZero) { ClockFake_SetTime(0, 0); - UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, OneSecondReturnsOneHundredHundredths) { ClockFake_SetTime(1, 0); - UNSIGNED_LONGS_EQUAL(100, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(100, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, TenMillisecondsIsOneHundredth) { ClockFake_SetTime(0, 10000000); - UNSIGNED_LONGS_EQUAL(1, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(1, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, SubHundredthNanosecondsTruncateToZero) { ClockFake_SetTime(0, 9999999); - UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, ClockGettimeFailureReturnsZero) { ClockFake_SetTime(123, 0); ClockFake_SetClockGettimeReturn(-1); - UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, MaxUint32Boundary) { // 42949672 sec * 100 = 4,294,967,200; + 95 hundredths (950 ms) = 4,294,967,295 = UINT32_MAX ClockFake_SetTime(42949672, 950000000); - UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogPosix_GetSysUpTime()); } TEST(SolidSyslogPosixSysUpTime, WrapsPastMaxUint32) { // 42949673 sec * 100 = 4,294,967,300 = UINT32_MAX + 5; uint32 cast wraps to 4 ClockFake_SetTime(42949673, 0); - UNSIGNED_LONGS_EQUAL(4, SolidSyslogPosixSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(4, SolidSyslogPosix_GetSysUpTime()); } diff --git a/Tests/SolidSyslogWindowsClockTest.cpp b/Tests/SolidSyslogWindowsClockTest.cpp index aa245d12..085debcb 100644 --- a/Tests/SolidSyslogWindowsClockTest.cpp +++ b/Tests/SolidSyslogWindowsClockTest.cpp @@ -53,7 +53,7 @@ TEST_GROUP(SolidSyslogWindowsClock) static struct SolidSyslogTimestamp getTimestamp() { struct SolidSyslogTimestamp ts = {}; - SolidSyslogWindowsClock_GetTimestamp(&ts); + SolidSyslogWindows_GetTimestamp(&ts); return ts; } diff --git a/Tests/SolidSyslogWindowsHostnameTest.cpp b/Tests/SolidSyslogWindowsHostnameTest.cpp index 6677b745..06f6be77 100644 --- a/Tests/SolidSyslogWindowsHostnameTest.cpp +++ b/Tests/SolidSyslogWindowsHostnameTest.cpp @@ -60,21 +60,21 @@ TEST_GROUP(SolidSyslogWindowsHostname) TEST(SolidSyslogWindowsHostname, WritesFakeHostnameIntoFormatter) { - SolidSyslogWindowsHostname_Get(&field, nullptr); + SolidSyslogWindows_GetHostname(&field, nullptr); STRCMP_EQUAL("winhost", formatted()); } TEST(SolidSyslogWindowsHostname, WritesNothingWhenApiFails) { fakeReturnValue = FALSE; - SolidSyslogWindowsHostname_Get(&field, nullptr); + SolidSyslogWindows_GetHostname(&field, nullptr); STRCMP_EQUAL("", formatted()); } TEST(SolidSyslogWindowsHostname, EmptyHostnameProducesEmptyString) { fakeHostname = ""; - SolidSyslogWindowsHostname_Get(&field, nullptr); + SolidSyslogWindows_GetHostname(&field, nullptr); STRCMP_EQUAL("", formatted()); } @@ -86,6 +86,6 @@ TEST(SolidSyslogWindowsHostname, HostnameTooLongForBufferProducesEmptyString) memset(longName, 'x', 260); longName[260] = '\0'; fakeHostname = longName; - SolidSyslogWindowsHostname_Get(&field, nullptr); + SolidSyslogWindows_GetHostname(&field, nullptr); STRCMP_EQUAL("", formatted()); } diff --git a/Tests/SolidSyslogWindowsProcessIdTest.cpp b/Tests/SolidSyslogWindowsProcessIdTest.cpp index 7327de45..0cd82fe6 100644 --- a/Tests/SolidSyslogWindowsProcessIdTest.cpp +++ b/Tests/SolidSyslogWindowsProcessIdTest.cpp @@ -43,20 +43,20 @@ TEST_GROUP(SolidSyslogWindowsProcessId) TEST(SolidSyslogWindowsProcessId, WritesFakePidAsDecimal) { - SolidSyslogWindowsProcessId_Get(&field, nullptr); + SolidSyslogWindows_GetProcessId(&field, nullptr); STRCMP_EQUAL("4321", formatted()); } TEST(SolidSyslogWindowsProcessId, WritesZeroWhenPidIsZero) { fakePid = 0; - SolidSyslogWindowsProcessId_Get(&field, nullptr); + SolidSyslogWindows_GetProcessId(&field, nullptr); STRCMP_EQUAL("0", formatted()); } TEST(SolidSyslogWindowsProcessId, WritesMaxDwordValueAsDecimal) { fakePid = 0xFFFFFFFFU; - SolidSyslogWindowsProcessId_Get(&field, nullptr); + SolidSyslogWindows_GetProcessId(&field, nullptr); STRCMP_EQUAL("4294967295", formatted()); } diff --git a/Tests/SolidSyslogWindowsSleepTest.cpp b/Tests/SolidSyslogWindowsSleepTest.cpp index d6073f2a..7968337b 100644 --- a/Tests/SolidSyslogWindowsSleepTest.cpp +++ b/Tests/SolidSyslogWindowsSleepTest.cpp @@ -2,14 +2,14 @@ #include "CppUTest/TestHarness.h" // clang-format off -TEST_GROUP(SolidSyslogWindowsSleep) +TEST_GROUP(SolidSyslogWindows_Sleep) { }; // clang-format on -TEST(SolidSyslogWindowsSleep, ReturnsImmediatelyForZero) +TEST(SolidSyslogWindows_Sleep, ReturnsImmediatelyForZero) { /* Sleep(0) yields the remainder of the thread's quantum and returns without blocking; the test pins that the wrapper does not crash. */ - SolidSyslogWindowsSleep(0); + SolidSyslogWindows_Sleep(0); } diff --git a/Tests/SolidSyslogWindowsSysUpTimeTest.cpp b/Tests/SolidSyslogWindowsSysUpTimeTest.cpp index 98220839..8b75cb22 100644 --- a/Tests/SolidSyslogWindowsSysUpTimeTest.cpp +++ b/Tests/SolidSyslogWindowsSysUpTimeTest.cpp @@ -27,37 +27,37 @@ TEST_GROUP(SolidSyslogWindowsSysUpTime) TEST(SolidSyslogWindowsSysUpTime, ZeroMillisecondsReturnsZero) { fakeTickCount = 0; - UNSIGNED_LONGS_EQUAL(0, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0, SolidSyslogWindows_GetSysUpTime()); } TEST(SolidSyslogWindowsSysUpTime, TenMillisecondsIsOneHundredth) { fakeTickCount = 10; - UNSIGNED_LONGS_EQUAL(1, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(1, SolidSyslogWindows_GetSysUpTime()); } TEST(SolidSyslogWindowsSysUpTime, NineMillisecondsTruncatesToZero) { fakeTickCount = 9; - UNSIGNED_LONGS_EQUAL(0, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(0, SolidSyslogWindows_GetSysUpTime()); } TEST(SolidSyslogWindowsSysUpTime, OneSecondIsOneHundredHundredths) { fakeTickCount = 1000; - UNSIGNED_LONGS_EQUAL(100, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(100, SolidSyslogWindows_GetSysUpTime()); } TEST(SolidSyslogWindowsSysUpTime, MaxUint32Boundary) { // UINT32_MAX hundredths = 4,294,967,295 hundredths * 10 ms/hundredth = 42,949,672,950 ms fakeTickCount = 42949672950ULL; - UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(UINT32_MAX, SolidSyslogWindows_GetSysUpTime()); } TEST(SolidSyslogWindowsSysUpTime, WrapsPastMaxUint32) { // 42,949,672,970 ms / 10 = 4,294,967,297 hundredths = UINT32_MAX + 2 → wraps to 1 fakeTickCount = 42949672970ULL; - UNSIGNED_LONGS_EQUAL(1, SolidSyslogWindowsSysUpTime_Get()); + UNSIGNED_LONGS_EQUAL(1, SolidSyslogWindows_GetSysUpTime()); } diff --git a/docs/NAMING.md b/docs/NAMING.md index 5e0d8a6b..ca9f216f 100644 --- a/docs/NAMING.md +++ b/docs/NAMING.md @@ -207,6 +207,34 @@ Note the deliberate opposite pull on pool-size tunables below: those are named for the role, because the integrator sizes "how many TLS streams" without caring which vendor fills them, while wiring the vendor's class by name. +### A platform's callbacks take the platform as their class + +A pack also ships plain functions that fill a `SolidSyslogConfig` callback rather +than a class: the clock, the host name, the process id, the uptime and the sleep. +These have no instance, no `Create` and no vtable, so there is no class for the +`_` portion to name — and inventing one produces a function name with no +content left to carry. + +**Form:** `SolidSyslog_`, matching the config field +it is assigned to. + +```c +config.Clock = SolidSyslogPosix_GetTimestamp; /* not SolidSyslogPosixClock_GetTimestamp */ +config.GetHostname = SolidSyslogPosix_GetHostname; /* not SolidSyslogPosixHostname_Get */ +config.GetProcessId = SolidSyslogPosix_GetProcessId; +``` + +`_Get` as a whole function name is the shape this rule exists to stop: it passes +the `SolidSyslog_` regex while saying nothing, because the verb +is the only word left once the noun has been spent on the class. + +The header **file** keeps the name of the thing it supplies — +`SolidSyslogPosixHostname.h` — so the platform-token rule above still holds over +every filename, and a reader looking for the host name callback still finds the +file by guessing it. This is the one place where the file name and the class name +in it differ, and it is deliberate: one file per thing supplied, one class per +platform. + --- ## Tier 2 — Internal linkage (file-scope `static`) diff --git a/docs/hardening-path.md b/docs/hardening-path.md index 1349d222..aa458784 100644 --- a/docs/hardening-path.md +++ b/docs/hardening-path.md @@ -339,7 +339,7 @@ an uptime source alongside its counter. ```c struct SolidSyslogMetaSdConfig metaConfig = { .Counter = SolidSyslogStdAtomicCounter_Create(), - .GetSysUpTime = SolidSyslogFreeRtosSysUpTime_Get, /* new */ + .GetSysUpTime = SolidSyslogFreeRtos_GetSysUpTime, /* new */ }; sd[1] = SolidSyslogTimeQualitySd_Create(SyslogTimeQuality); ``` diff --git a/docs/platforms/posix/setup.md b/docs/platforms/posix/setup.md index fea4bab2..5f786532 100644 --- a/docs/platforms/posix/setup.md +++ b/docs/platforms/posix/setup.md @@ -45,7 +45,7 @@ Tear down in reverse order, and destroy everything you created. `SolidSyslogConfig` takes the clock, hostname and process id as callbacks rather than components, and this platform supplies one of each ready to use: -`SolidSyslogPosixClock_GetTimestamp`, `SolidSyslogPosixHostname` and +`SolidSyslogPosix_GetTimestamp`, `SolidSyslogPosixHostname` and `SolidSyslogPosixProcessId`. Use them directly, or wrap your own if the values should come from somewhere other than the operating system. diff --git a/docs/platforms/windows/setup.md b/docs/platforms/windows/setup.md index 61ae89b6..794c628a 100644 --- a/docs/platforms/windows/setup.md +++ b/docs/platforms/windows/setup.md @@ -51,8 +51,8 @@ instead. Tear down in reverse order, before `WSACleanup`. ## The callbacks `SolidSyslogConfig` takes the clock, hostname and process id as callbacks, and -this platform supplies one of each: `SolidSyslogWindowsClock_GetTimestamp`, -`SolidSyslogWindowsHostname` and `SolidSyslogWindowsProcessId`. +this platform supplies one of each: `SolidSyslogWindows_GetTimestamp`, +`SolidSyslogWindows_GetHostname` and `SolidSyslogWindows_GetProcessId`. ## Threading From 70af7f09e9aa96cb02a644e324fa38e9d8b20bf7 Mon Sep 17 00:00:00 2001 From: David Cozens Date: Mon, 10 Aug 2026 19:41:58 +0100 Subject: [PATCH 2/3] docs: S23.22 hold the Windows page to what the adapters do Corrects the host-identity claim, and states the three things the page was silent on: writes are not flushed, the keepalive window is 85 seconds, and tuning it needs Windows 10 1709. Co-Authored-By: Claude Opus 5 (1M context) --- docs/platforms/windows/index.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/platforms/windows/index.md b/docs/platforms/windows/index.md index cf15ca4d..d62d0d19 100644 --- a/docs/platforms/windows/index.md +++ b/docs/platforms/windows/index.md @@ -14,6 +14,9 @@ callbacks. The MSVC toolchain and Winsock — call `WSAStartup` once at process init before creating a sender. +The keepalive timings below need Windows 10 version 1709 or later; older systems +keep the system defaults, and the adapter does not report the difference. + ## Security behaviour and obligations ### The transport carries syslog in clear @@ -29,13 +32,30 @@ stream rather than replacing it. and the matching `WSACleanup` is yours to place. The adapter does not initialise Winsock, because a process that already uses sockets has done it. +### A written record is the operating system's, not the disk's + +The file layer writes and returns; nothing forces the data further down. A record +the store believes is stored survives the process exiting and may not survive the +machine losing power, so durability is a property of the volume you point the +store at. + +### A peer that dies silently takes up to 85 seconds to notice + +Keepalive probes after 45 seconds idle, then four times at ten-second intervals. +Windows has no user-timeout setting, so a peer that dies with a write in flight +is bounded by the system's retransmission behaviour instead. Sends into a +connection not yet declared dead are accepted and reported as delivered, so the +records inside that window are released by store-and-forward and lost with it. + ### Protection of the store is a property of its directory Where the store is written, and which accounts can reach it, are decided by the -directory you choose and the access control on it. The library sets no policy of -its own and checks none. +directory you choose and the access control on it. The files are opened with +sharing permitted, so another process may read or write them while the store is +running. The library sets no policy of its own and checks none. ### Host identity is only as good as the operating system's -The hostname and process id are read from Windows and forwarded unmodified. The -library performs no independent check of either. +The host name is what Windows reports as the physical DNS host name, and the +process id is the one Windows assigns. The library performs no independent check +of either. From f48abed87179a2bbb1eb890c22bf3b14e81d4cbf Mon Sep 17 00:00:00 2001 From: David Cozens Date: Mon, 10 Aug 2026 21:32:00 +0100 Subject: [PATCH 3/3] docs: fix the two setup pages still naming the old callbacks The Posix page carried the same missing-suffix defect the Windows page did, and the FreeRTOS page named the component where it means the function. Co-Authored-By: Claude Opus 5 (1M context) --- docs/platforms/freertos/setup.md | 2 +- docs/platforms/posix/setup.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/platforms/freertos/setup.md b/docs/platforms/freertos/setup.md index 4e01d69d..0d20ebb9 100644 --- a/docs/platforms/freertos/setup.md +++ b/docs/platforms/freertos/setup.md @@ -50,7 +50,7 @@ the right answer and costs nothing. ## Uptime -`SolidSyslogFreeRtosSysUpTime` reports kernel ticks since boot. It is not +`SolidSyslogFreeRtos_GetSysUpTime` reports kernel ticks since boot. It is not wall-clock time — the clock callback in `SolidSyslogConfig` is a separate injection point, and on a target with no real-time clock a timestamp the library cannot establish is emitted as absent rather than as a plausible wrong diff --git a/docs/platforms/posix/setup.md b/docs/platforms/posix/setup.md index 5f786532..e4a80635 100644 --- a/docs/platforms/posix/setup.md +++ b/docs/platforms/posix/setup.md @@ -45,8 +45,8 @@ Tear down in reverse order, and destroy everything you created. `SolidSyslogConfig` takes the clock, hostname and process id as callbacks rather than components, and this platform supplies one of each ready to use: -`SolidSyslogPosix_GetTimestamp`, `SolidSyslogPosixHostname` and -`SolidSyslogPosixProcessId`. Use them directly, or wrap your own if the values +`SolidSyslogPosix_GetTimestamp`, `SolidSyslogPosix_GetHostname` and +`SolidSyslogPosix_GetProcessId`. Use them directly, or wrap your own if the values should come from somewhere other than the operating system. ## Threading