Skip to content

File SolidSyslogNullAtomicCounter.h

FileList > Core > Interface > SolidSyslogNullAtomicCounter.h

Go to the source code of this file

The no-op AtomicCounter Null object: Increment returns 1U unconditionally, the safest value when a real counter is unavailable (RFC 5424 §7.3.1 forbids a sequenceId of 0).

  • #include "ExternC.h"

Public Functions

Type Name
EXTERN_C_BEGIN struct SolidSyslogAtomicCounter * SolidSyslogNullAtomicCounter_Get (void)
Increment returns 1U unconditionally.

Public Functions Documentation

function SolidSyslogNullAtomicCounter_Get

Increment returns 1U unconditionally.

EXTERN_C_BEGIN struct SolidSyslogAtomicCounter * SolidSyslogNullAtomicCounter_Get (
    void
) 

RFC 5424 §7.3.1 forbids a sequenceId of 0, and 1U is indistinguishable from the post-power-on or post-wrap state, so it is the safest value when a real counter is unavailable.



The documentation for this class was generated from the following file Core/Interface/SolidSyslogNullAtomicCounter.h