Skip to content

refactor: prefix the cross-TU lifecycle functions - #800

Merged
DavidCozens merged 1 commit into
feature/tls-reworkfrom
refactor/prefix-cross-tu-lifecycle-functions
Sep 1, 2026
Merged

refactor: prefix the cross-TU lifecycle functions#800
DavidCozens merged 1 commit into
feature/tls-reworkfrom
refactor/prefix-cross-tu-lifecycle-functions

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Purpose

docs/NAMING.md decides Tier 1 by linkage, not by whether an integrator calls the
identifier: anything with external linkage takes the SolidSyslog prefix. Every
<Class>_Initialise and <Class>_Cleanup breaks that rule. They are declared in
*Private.h, defined in <Class>.c and called from <Class>Static.c, so they have
external linkage and the unprefixed form is the symbol collision the rule exists to
prevent — an integrator building from a Path B manifest gets every object in one
directory.

No issue behind this; it was found reviewing #799.

Change Description

Eighty-seven functions renamed to SolidSyslog<Class>_Initialise /
SolidSyslog<Class>_Cleanup across Core and the nine platform packs. Mechanical
prefix addition — no signature, no call graph and no behaviour changes.

The _Report helpers that sit beside them in the same headers are static inline,
so their linkage is internal and the Tier 2 form they carry is correct. They are
untouched.

Two documentation code samples name one of the renamed functions, so both were
swept with the code: the pool-Create worked example in docs/porting.md and the
Tier 2 example in docs/NAMING.md. scripts/check_references.py then rejected
docs/porting.md — the symbol now begins SolidSyslog and resolves only in a
private header — so it gains an ALLOWED entry alongside the two
SolidSyslogPoolAllocator_* entries already there for the same example.

misra_suppressions.txt is renumbered for the lines clang-format reflowed.

This is the safe half of the naming work. The 44 *ErrorSource objects declared in
public *Errors.h headers break the same rule, but integrators match on their
address, so renaming them is an API break and follows separately inside the 0.2.0
break window.

Test Evidence

No new tests — a rename with no behaviour change, covered by the existing suites.

  • debug preset, gcc image: 1526 tests, 3659 checks, 0 failures.
  • debug preset, cpputest-freertos image: green, so the FreeRTOS, lwIP, Plus-TCP,
    Plus-FAT, FatFs and mbedTLS trees the gcc image skips are covered.
  • CI's own cppcheck-misra invocation reproduced locally: exit 0, the same six
    pre-existing findings as the branch base and no new ones.
  • check_references.py, check_platform_docs.py, check_spdx_headers.py: green.
  • markdownlint-cli2 v0.22.1 over both changed pages: 0 errors.

Areas Affected

Core/Source/, all nine Platform/*/Source/ trees, the unit tests that name the
functions in comments, docs/porting.md, docs/NAMING.md,
scripts/check_references.py, misra_suppressions.txt. No public header changes,
so no impact on integrators or on the example repositories.

Summary by CodeRabbit

  • Refactor

    • Standardised initialisation and cleanup API names across core, platform, networking, and security components.
    • Updated internal creation and destruction flows to use the consistent names.
    • Existing parameters, behaviour, error handling, and resource management remain unchanged.
  • Documentation

    • Updated naming and porting examples to reflect the revised APIs.
  • Chores

    • Updated static-analysis references and validation exceptions to match the changes.

Every <Class>_Initialise and <Class>_Cleanup has external linkage and is
declared in a *Private.h header, so docs/NAMING.md puts it at Tier 1 and
requires the SolidSyslog prefix. Eighty-seven functions across Core and the
nine platform packs carried the Tier 2 form instead.

The _Report helpers in the same headers are static inline, so they keep the
Tier 2 form and are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   JUnit   build-linux-gcc (Whole Project): ✅ successful — 1560 passed
   JUnit   build-freertos-host-tdd-plustcp (Whole Project): ✅ successful — 1936 passed
   JUnit   build-linux-clang (Whole Project): ✅ successful — 1491 passed
   JUnit   sanitize-linux-gcc (Whole Project): ✅ successful — 1491 passed
   JUnit   integration-linux-openssl (Whole Project): ✅ successful — 17 passed
   JUnit   integration-linux-mbedtls (Whole Project): ✅ successful — 17 passed
   JUnit   integration-windows-openssl (Whole Project): ✅ successful — 17 passed
   JUnit   bdd-linux-syslog-ng (Whole Project): ✅ successful — 49 passed, 3 skipped
   JUnit   bdd-windows-otel (Whole Project): ✅ successful — 46 passed, 6 skipped
   JUnit   bdd-freertos-qemu-plustcp (Whole Project): ✅ successful — 45 passed, 7 skipped
   JUnit   bdd-freertos-qemu-lwip (Whole Project): ✅ successful — 45 passed, 7 skipped
   JUnit   build-windows-msvc (Whole Project): ✅ successful — 1333 passed
   JUnit   build-linux-tunable-override (Whole Project): ✅ successful — 1491 passed
   ⚠️   Clang-Tidy (Whole Project): No warnings
   ⚠️   CPPCheck (Whole Project): No warnings


Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 174d1283-e2b7-4443-becf-766d2e444d13

📥 Commits

Reviewing files that changed from the base of the PR and between c6720e3 and 485a311.

📒 Files selected for processing (137)
  • Core/Source/SolidSyslogBlockStore.c
  • Core/Source/SolidSyslogBlockStorePrivate.h
  • Core/Source/SolidSyslogBlockStoreStatic.c
  • Core/Source/SolidSyslogCircularBuffer.c
  • Core/Source/SolidSyslogCircularBufferPrivate.h
  • Core/Source/SolidSyslogCircularBufferStatic.c
  • Core/Source/SolidSyslogFileBlockDevice.c
  • Core/Source/SolidSyslogFileBlockDevicePrivate.h
  • Core/Source/SolidSyslogFileBlockDeviceStatic.c
  • Core/Source/SolidSyslogMetaSd.c
  • Core/Source/SolidSyslogMetaSdPrivate.h
  • Core/Source/SolidSyslogMetaSdStatic.c
  • Core/Source/SolidSyslogOriginSd.c
  • Core/Source/SolidSyslogOriginSdPrivate.h
  • Core/Source/SolidSyslogOriginSdStatic.c
  • Core/Source/SolidSyslogPassthroughBuffer.c
  • Core/Source/SolidSyslogPassthroughBufferPrivate.h
  • Core/Source/SolidSyslogPassthroughBufferStatic.c
  • Core/Source/SolidSyslogStreamSender.c
  • Core/Source/SolidSyslogStreamSenderPrivate.h
  • Core/Source/SolidSyslogStreamSenderStatic.c
  • Core/Source/SolidSyslogSwitchingSender.c
  • Core/Source/SolidSyslogSwitchingSenderPrivate.h
  • Core/Source/SolidSyslogSwitchingSenderStatic.c
  • Core/Source/SolidSyslogTimeQualitySd.c
  • Core/Source/SolidSyslogTimeQualitySdPrivate.h
  • Core/Source/SolidSyslogTimeQualitySdStatic.c
  • Core/Source/SolidSyslogUdpSender.c
  • Core/Source/SolidSyslogUdpSenderPrivate.h
  • Core/Source/SolidSyslogUdpSenderStatic.c
  • Platform/FatFs/Source/SolidSyslogFatFsFile.c
  • Platform/FatFs/Source/SolidSyslogFatFsFilePrivate.h
  • Platform/FatFs/Source/SolidSyslogFatFsFileStatic.c
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosMutex.c
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosMutexPrivate.h
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosMutexStatic.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawAddress.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawAddressPrivate.h
  • Platform/LwipRaw/Source/SolidSyslogLwipRawAddressStatic.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDatagram.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDatagramPrivate.h
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDatagramStatic.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDnsResolver.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDnsResolverPrivate.h
  • Platform/LwipRaw/Source/SolidSyslogLwipRawDnsResolverStatic.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawResolver.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawResolverPrivate.h
  • Platform/LwipRaw/Source/SolidSyslogLwipRawResolverStatic.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawTcpStream.c
  • Platform/LwipRaw/Source/SolidSyslogLwipRawTcpStreamPrivate.h
  • Platform/LwipRaw/Source/SolidSyslogLwipRawTcpStreamStatic.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsAesGcmPolicy.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsAesGcmPolicyPrivate.h
  • Platform/MbedTls/Source/SolidSyslogMbedTlsAesGcmPolicyStatic.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsHmacSha256Policy.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsHmacSha256PolicyPrivate.h
  • Platform/MbedTls/Source/SolidSyslogMbedTlsHmacSha256PolicyStatic.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsStream.c
  • Platform/MbedTls/Source/SolidSyslogMbedTlsStreamPrivate.h
  • Platform/MbedTls/Source/SolidSyslogMbedTlsStreamStatic.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslAesGcmPolicy.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslAesGcmPolicyPrivate.h
  • Platform/OpenSsl/Source/SolidSyslogOpenSslAesGcmPolicyStatic.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslHmacSha256Policy.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslHmacSha256PolicyPrivate.h
  • Platform/OpenSsl/Source/SolidSyslogOpenSslHmacSha256PolicyStatic.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslPemFileCredentials.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslPemFileCredentialsPrivate.h
  • Platform/OpenSsl/Source/SolidSyslogOpenSslPemFileCredentialsStatic.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslStream.c
  • Platform/OpenSsl/Source/SolidSyslogOpenSslStreamPrivate.h
  • Platform/OpenSsl/Source/SolidSyslogOpenSslStreamStatic.c
  • Platform/PlusFat/Source/SolidSyslogPlusFatFile.c
  • Platform/PlusFat/Source/SolidSyslogPlusFatFilePrivate.h
  • Platform/PlusFat/Source/SolidSyslogPlusFatFileStatic.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpAddress.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpAddressPrivate.h
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpAddressStatic.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpDatagram.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpDatagramPrivate.h
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpDatagramStatic.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpResolver.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpResolverPrivate.h
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpResolverStatic.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpTcpStream.c
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpTcpStreamPrivate.h
  • Platform/PlusTcp/Source/SolidSyslogPlusTcpTcpStreamStatic.c
  • Platform/Posix/Source/SolidSyslogPosixAddress.c
  • Platform/Posix/Source/SolidSyslogPosixAddressPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixAddressStatic.c
  • Platform/Posix/Source/SolidSyslogPosixDatagram.c
  • Platform/Posix/Source/SolidSyslogPosixDatagramPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixDatagramStatic.c
  • Platform/Posix/Source/SolidSyslogPosixFile.c
  • Platform/Posix/Source/SolidSyslogPosixFilePrivate.h
  • Platform/Posix/Source/SolidSyslogPosixFileStatic.c
  • Platform/Posix/Source/SolidSyslogPosixMessageQueueBuffer.c
  • Platform/Posix/Source/SolidSyslogPosixMessageQueueBufferPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixMessageQueueBufferStatic.c
  • Platform/Posix/Source/SolidSyslogPosixMutex.c
  • Platform/Posix/Source/SolidSyslogPosixMutexPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixMutexStatic.c
  • Platform/Posix/Source/SolidSyslogPosixResolver.c
  • Platform/Posix/Source/SolidSyslogPosixResolverPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixResolverStatic.c
  • Platform/Posix/Source/SolidSyslogPosixTcpStream.c
  • Platform/Posix/Source/SolidSyslogPosixTcpStreamPrivate.h
  • Platform/Posix/Source/SolidSyslogPosixTcpStreamStatic.c
  • Platform/StdAtomic/Source/SolidSyslogStdAtomicCounter.c
  • Platform/StdAtomic/Source/SolidSyslogStdAtomicCounterPrivate.h
  • Platform/StdAtomic/Source/SolidSyslogStdAtomicCounterStatic.c
  • Platform/Windows/Source/SolidSyslogWindowsAtomicCounter.c
  • Platform/Windows/Source/SolidSyslogWindowsAtomicCounterPrivate.h
  • Platform/Windows/Source/SolidSyslogWindowsAtomicCounterStatic.c
  • Platform/Windows/Source/SolidSyslogWindowsFile.c
  • Platform/Windows/Source/SolidSyslogWindowsFilePrivate.h
  • Platform/Windows/Source/SolidSyslogWindowsFileStatic.c
  • Platform/Windows/Source/SolidSyslogWindowsMutex.c
  • Platform/Windows/Source/SolidSyslogWindowsMutexPrivate.h
  • Platform/Windows/Source/SolidSyslogWindowsMutexStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockAddress.c
  • Platform/Windows/Source/SolidSyslogWinsockAddressPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockAddressStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockDatagram.c
  • Platform/Windows/Source/SolidSyslogWinsockDatagramPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockDatagramStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockResolver.c
  • Platform/Windows/Source/SolidSyslogWinsockResolverPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockResolverStatic.c
  • Platform/Windows/Source/SolidSyslogWinsockTcpStream.c
  • Platform/Windows/Source/SolidSyslogWinsockTcpStreamPrivate.h
  • Platform/Windows/Source/SolidSyslogWinsockTcpStreamStatic.c
  • Tests/MbedTls/SolidSyslogMbedTlsStreamTest.cpp
  • docs/NAMING.md
  • docs/porting.md
  • misra_suppressions.txt
  • scripts/check_references.py

Walkthrough

The pull request renames lifecycle initialisation and cleanup functions across core and platform implementations to use fully qualified SolidSyslog prefixes. It updates declarations, pool call sites, comments, documentation, test comments, MISRA suppressions, and reference-check exceptions.

Changes

Lifecycle API renaming

Layer / File(s) Summary
Core lifecycle APIs
Core/Source/SolidSyslog*
Core lifecycle definitions, declarations, and pool callbacks now use qualified SolidSyslog names.
Embedded platform lifecycle APIs
Platform/FatFs/..., Platform/FreeRtos/..., Platform/LwipRaw/..., Platform/StdAtomic/...
Embedded platform lifecycle symbols and pool call sites now use qualified names.
Cryptographic platform lifecycle APIs
Platform/MbedTls/..., Platform/OpenSsl/...
MbedTLS and OpenSSL policy, credential, and stream lifecycle symbols now use qualified names.
Plus platform lifecycle APIs
Platform/PlusFat/..., Platform/PlusTcp/...
PlusFat and PlusTcp lifecycle symbols and pool call sites now use qualified names.
POSIX lifecycle APIs
Platform/Posix/...
POSIX resource lifecycle symbols and pool call sites now use qualified names.
Windows lifecycle APIs
Platform/Windows/...
Windows and Winsock lifecycle symbols and pool call sites now use qualified names.
Reference and analysis updates
Tests/MbedTls/..., docs/..., misra_suppressions.txt, scripts/check_references.py
References, comments, suppression locations, and allowlisted documentation symbols were updated for the renamed APIs.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/prefix-cross-tu-lifecycle-functions

Comment @coderabbitai help to get the list of available commands.

@DavidCozens
DavidCozens merged commit 5bb8d06 into feature/tls-rework Sep 1, 2026
37 of 38 checks passed
@DavidCozens
DavidCozens deleted the refactor/prefix-cross-tu-lifecycle-functions branch September 1, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant