Skip to content

Windows platform

«interface»SolidSyslogAtomicCounterWindowsAtomicCounterWindows

File SolidSyslogWindowsAtomicCounter.h

FileList > Interface > SolidSyslogWindowsAtomicCounter.h

  • #include "SolidSyslogExternC.h"

Detailed Description

An AtomicCounter over the Win32 Interlocked API, backing the RFC 5424 sequenceId on Windows targets without C11 <stdatomic.h> (legacy MSVC).

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

SolidSyslogWindowsAtomicCounter_Create

Create takes no config; an exhausted pool falls back to the shared NullAtomicCounter, whose Increment returns 1 unconditionally.

struct SolidSyslogAtomicCounter * SolidSyslogWindowsAtomicCounter_Create (
    void
) 


SolidSyslogWindowsAtomicCounter_Destroy

Release the pool slot; the counter's state is discarded.

void SolidSyslogWindowsAtomicCounter_Destroy (
    struct SolidSyslogAtomicCounter * base
) 



The documentation for this class was generated from the following file Platform/Windows/Interface/SolidSyslogWindowsAtomicCounter.h