File SolidSyslogWindowsAtomicCounter.h¶
FileList > Interface > SolidSyslogWindowsAtomicCounter.h
Go to the source code of this file
An AtomicCounter over the Win32 Interlocked API, backing the RFC 5424 sequenceId on Windows targets without C11 <stdatomic.h> (legacy MSVC). More...
#include "ExternC.h"
Public Functions¶
| Type | Name |
|---|---|
| struct SolidSyslogAtomicCounter * | SolidSyslogWindowsAtomicCounter_Create (void) Create takes no config; an exhausted pool falls back to the shared NullAtomicCounter, whose Increment returns 1 unconditionally. |
| void | SolidSyslogWindowsAtomicCounter_Destroy (struct SolidSyslogAtomicCounter * base) Release the pool slot; the counter's state is discarded. |
Detailed Description¶
Increment runs a lock-free InterlockedCompareExchange CAS loop on a volatile LONG; the sequence is wrap-aware in [1, 2^31 - 1] and skips zero on wrap, so a returned value is never 0.
Public Functions Documentation¶
function SolidSyslogWindowsAtomicCounter_Create¶
Create takes no config; an exhausted pool falls back to the shared NullAtomicCounter, whose Increment returns 1 unconditionally.
function SolidSyslogWindowsAtomicCounter_Destroy¶
Release the pool slot; the counter's state is discarded.
The documentation for this class was generated from the following file Platform/Windows/Interface/SolidSyslogWindowsAtomicCounter.h