Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Core/Source/BlockSequenceStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "SolidSyslogPoolAllocator.h"
#include "SolidSyslogTunables.h"

static size_t BlockSequence_IndexFromHandle(const struct BlockSequence* blockSequence);
static void BlockSequence_CleanupAtIndex(size_t index, void* context);
static inline size_t BlockSequence_IndexFromHandle(const struct BlockSequence* blockSequence);
static inline void BlockSequence_CleanupAtIndex(size_t index, void* context);

static bool BlockSequence_InUse[SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE];
static struct BlockSequence BlockSequence_Pool[SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE];
Expand Down Expand Up @@ -39,7 +39,7 @@ void BlockSequence_Destroy(struct BlockSequence* blockSequence)
}
}

static size_t BlockSequence_IndexFromHandle(const struct BlockSequence* blockSequence)
static inline size_t BlockSequence_IndexFromHandle(const struct BlockSequence* blockSequence)
{
size_t result = SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE; poolIndex++)
Expand All @@ -53,7 +53,7 @@ static size_t BlockSequence_IndexFromHandle(const struct BlockSequence* blockSeq
return result;
}

static void BlockSequence_CleanupAtIndex(size_t index, void* context)
static inline void BlockSequence_CleanupAtIndex(size_t index, void* context)
{
(void) context;
BlockSequence_Cleanup(&BlockSequence_Pool[index]);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/RecordStoreStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

struct SolidSyslogSecurityPolicy;

static size_t RecordStore_IndexFromHandle(const struct RecordStore* recordStore);
static void RecordStore_CleanupAtIndex(size_t index, void* context);
static inline size_t RecordStore_IndexFromHandle(const struct RecordStore* recordStore);
static inline void RecordStore_CleanupAtIndex(size_t index, void* context);

static bool RecordStore_InUse[SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE];
static struct RecordStore RecordStore_Pool[SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE];
Expand Down Expand Up @@ -38,7 +38,7 @@ void RecordStore_Destroy(struct RecordStore* recordStore)
}
}

static size_t RecordStore_IndexFromHandle(const struct RecordStore* recordStore)
static inline size_t RecordStore_IndexFromHandle(const struct RecordStore* recordStore)
{
size_t result = SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE; poolIndex++)
Expand All @@ -52,7 +52,7 @@ static size_t RecordStore_IndexFromHandle(const struct RecordStore* recordStore)
return result;
}

static void RecordStore_CleanupAtIndex(size_t index, void* context)
static inline void RecordStore_CleanupAtIndex(size_t index, void* context)
{
(void) context;
RecordStore_Cleanup(&RecordStore_Pool[index]);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogBlockStoreStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

struct SolidSyslogStore;

static size_t BlockStore_IndexFromHandle(const struct SolidSyslogStore* base);
static void BlockStore_CleanupAtIndex(size_t index, void* context);
static inline size_t BlockStore_IndexFromHandle(const struct SolidSyslogStore* base);
static inline void BlockStore_CleanupAtIndex(size_t index, void* context);
static struct SolidSyslogSecurityPolicy* BlockStore_ResolveSecurityPolicy(struct SolidSyslogSecurityPolicy* configured);
static struct BlockSequenceConfig BlockStore_BuildBlockSequenceConfig(
const struct SolidSyslogBlockStoreConfig* config,
Expand Down Expand Up @@ -100,7 +100,7 @@ void SolidSyslogBlockStore_Destroy(struct SolidSyslogStore* base)
}
}

static size_t BlockStore_IndexFromHandle(const struct SolidSyslogStore* base)
static inline size_t BlockStore_IndexFromHandle(const struct SolidSyslogStore* base)
{
size_t result = SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE; poolIndex++)
Expand All @@ -114,7 +114,7 @@ static size_t BlockStore_IndexFromHandle(const struct SolidSyslogStore* base)
return result;
}

static void BlockStore_CleanupAtIndex(size_t index, void* context)
static inline void BlockStore_CleanupAtIndex(size_t index, void* context)
{
(void) context;
BlockStore_Cleanup(&BlockStore_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogCircularBufferStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
struct SolidSyslogBuffer;
struct SolidSyslogMutex;

static size_t CircularBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base);
static void CircularBuffer_CleanupAtIndex(size_t index, void* context);
static inline size_t CircularBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base);
static inline void CircularBuffer_CleanupAtIndex(size_t index, void* context);

static bool CircularBuffer_InUse[SOLIDSYSLOG_CIRCULAR_BUFFER_POOL_SIZE];
static struct SolidSyslogCircularBuffer CircularBuffer_Pool[SOLIDSYSLOG_CIRCULAR_BUFFER_POOL_SIZE];
Expand Down Expand Up @@ -57,7 +57,7 @@ void SolidSyslogCircularBuffer_Destroy(struct SolidSyslogBuffer* base)
}
}

static size_t CircularBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base)
static inline size_t CircularBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base)
{
size_t result = SOLIDSYSLOG_CIRCULAR_BUFFER_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_CIRCULAR_BUFFER_POOL_SIZE; poolIndex++)
Expand All @@ -71,7 +71,7 @@ static size_t CircularBuffer_IndexFromHandle(const struct SolidSyslogBuffer* bas
return result;
}

static void CircularBuffer_CleanupAtIndex(size_t index, void* context)
static inline void CircularBuffer_CleanupAtIndex(size_t index, void* context)
{
(void) context;
CircularBuffer_Cleanup(&CircularBuffer_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogFileBlockDeviceStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
struct SolidSyslogBlockDevice;
struct SolidSyslogFile;

static size_t FileBlockDevice_IndexFromHandle(const struct SolidSyslogBlockDevice* base);
static void FileBlockDevice_CleanupAtIndex(size_t index, void* context);
static inline size_t FileBlockDevice_IndexFromHandle(const struct SolidSyslogBlockDevice* base);
static inline void FileBlockDevice_CleanupAtIndex(size_t index, void* context);

static bool FileBlockDevice_InUse[SOLIDSYSLOG_FILE_BLOCK_DEVICE_POOL_SIZE];
static struct SolidSyslogFileBlockDevice FileBlockDevice_Pool[SOLIDSYSLOG_FILE_BLOCK_DEVICE_POOL_SIZE];
Expand Down Expand Up @@ -52,7 +52,7 @@ void SolidSyslogFileBlockDevice_Destroy(struct SolidSyslogBlockDevice* base)
}
}

static size_t FileBlockDevice_IndexFromHandle(const struct SolidSyslogBlockDevice* base)
static inline size_t FileBlockDevice_IndexFromHandle(const struct SolidSyslogBlockDevice* base)
{
size_t result = SOLIDSYSLOG_FILE_BLOCK_DEVICE_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_FILE_BLOCK_DEVICE_POOL_SIZE; poolIndex++)
Expand All @@ -66,7 +66,7 @@ static size_t FileBlockDevice_IndexFromHandle(const struct SolidSyslogBlockDevic
return result;
}

static void FileBlockDevice_CleanupAtIndex(size_t index, void* context)
static inline void FileBlockDevice_CleanupAtIndex(size_t index, void* context)
{
(void) context;
FileBlockDevice_Cleanup(&FileBlockDevice_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogMetaSdStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
struct SolidSyslogStructuredData;

static bool MetaSd_IsValidConfig(const struct SolidSyslogMetaSdConfig* config);
static size_t MetaSd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static void MetaSd_CleanupAtIndex(size_t index, void* context);
static inline size_t MetaSd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static inline void MetaSd_CleanupAtIndex(size_t index, void* context);

static bool MetaSd_InUse[SOLIDSYSLOG_META_SD_POOL_SIZE];
static struct SolidSyslogMetaSd MetaSd_Pool[SOLIDSYSLOG_META_SD_POOL_SIZE];
Expand Down Expand Up @@ -69,7 +69,7 @@ static bool MetaSd_IsValidConfig(const struct SolidSyslogMetaSdConfig* config)
return valid;
}

static size_t MetaSd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
static inline size_t MetaSd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
{
size_t result = SOLIDSYSLOG_META_SD_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_META_SD_POOL_SIZE; poolIndex++)
Expand All @@ -83,7 +83,7 @@ static size_t MetaSd_IndexFromHandle(const struct SolidSyslogStructuredData* bas
return result;
}

static void MetaSd_CleanupAtIndex(size_t index, void* context)
static inline void MetaSd_CleanupAtIndex(size_t index, void* context)
{
(void) context;
MetaSd_Cleanup(&MetaSd_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogOriginSdStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

struct SolidSyslogStructuredData;

static size_t OriginSd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static void OriginSd_CleanupAtIndex(size_t index, void* context);
static inline size_t OriginSd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static inline void OriginSd_CleanupAtIndex(size_t index, void* context);

static bool OriginSd_InUse[SOLIDSYSLOG_ORIGIN_SD_POOL_SIZE];
static struct SolidSyslogOriginSd OriginSd_Pool[SOLIDSYSLOG_ORIGIN_SD_POOL_SIZE];
Expand Down Expand Up @@ -47,7 +47,7 @@ void SolidSyslogOriginSd_Destroy(struct SolidSyslogStructuredData* base)
}
}

static size_t OriginSd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
static inline size_t OriginSd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
{
size_t result = SOLIDSYSLOG_ORIGIN_SD_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_ORIGIN_SD_POOL_SIZE; poolIndex++)
Expand All @@ -61,7 +61,7 @@ static size_t OriginSd_IndexFromHandle(const struct SolidSyslogStructuredData* b
return result;
}

static void OriginSd_CleanupAtIndex(size_t index, void* context)
static inline void OriginSd_CleanupAtIndex(size_t index, void* context)
{
(void) context;
OriginSd_Cleanup(&OriginSd_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogPassthroughBufferStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
struct SolidSyslogBuffer;
struct SolidSyslogSender;

static size_t PassthroughBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base);
static void PassthroughBuffer_CleanupAtIndex(size_t index, void* context);
static inline size_t PassthroughBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base);
static inline void PassthroughBuffer_CleanupAtIndex(size_t index, void* context);

static bool PassthroughBuffer_InUse[SOLIDSYSLOG_PASSTHROUGH_BUFFER_POOL_SIZE];
static struct SolidSyslogPassthroughBuffer PassthroughBuffer_Pool[SOLIDSYSLOG_PASSTHROUGH_BUFFER_POOL_SIZE];
Expand Down Expand Up @@ -56,7 +56,7 @@ void SolidSyslogPassthroughBuffer_Destroy(struct SolidSyslogBuffer* base)
}
}

static size_t PassthroughBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base)
static inline size_t PassthroughBuffer_IndexFromHandle(const struct SolidSyslogBuffer* base)
{
size_t result = SOLIDSYSLOG_PASSTHROUGH_BUFFER_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_PASSTHROUGH_BUFFER_POOL_SIZE; poolIndex++)
Expand All @@ -70,7 +70,7 @@ static size_t PassthroughBuffer_IndexFromHandle(const struct SolidSyslogBuffer*
return result;
}

static void PassthroughBuffer_CleanupAtIndex(size_t index, void* context)
static inline void PassthroughBuffer_CleanupAtIndex(size_t index, void* context)
{
(void) context;
PassthroughBuffer_Cleanup(&PassthroughBuffer_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogStreamSenderStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

struct SolidSyslogSender;

static size_t StreamSender_IndexFromHandle(const struct SolidSyslogSender* base);
static void StreamSender_CleanupAtIndex(size_t index, void* context);
static inline size_t StreamSender_IndexFromHandle(const struct SolidSyslogSender* base);
static inline void StreamSender_CleanupAtIndex(size_t index, void* context);

static bool StreamSender_InUse[SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE];
static struct SolidSyslogStreamSender StreamSender_Pool[SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE];
Expand Down Expand Up @@ -51,7 +51,7 @@ void SolidSyslogStreamSender_Destroy(struct SolidSyslogSender* base)
}
}

static size_t StreamSender_IndexFromHandle(const struct SolidSyslogSender* base)
static inline size_t StreamSender_IndexFromHandle(const struct SolidSyslogSender* base)
{
size_t result = SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE; poolIndex++)
Expand All @@ -65,7 +65,7 @@ static size_t StreamSender_IndexFromHandle(const struct SolidSyslogSender* base)
return result;
}

static void StreamSender_CleanupAtIndex(size_t index, void* context)
static inline void StreamSender_CleanupAtIndex(size_t index, void* context)
{
(void) context;
StreamSender_Cleanup(&StreamSender_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogSwitchingSenderStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
struct SolidSyslogSender;

static bool SwitchingSender_IsValidConfig(const struct SolidSyslogSwitchingSenderConfig* config);
static size_t SwitchingSender_IndexFromHandle(const struct SolidSyslogSender* base);
static void SwitchingSender_CleanupAtIndex(size_t index, void* context);
static inline size_t SwitchingSender_IndexFromHandle(const struct SolidSyslogSender* base);
static inline void SwitchingSender_CleanupAtIndex(size_t index, void* context);

static bool SwitchingSender_InUse[SOLIDSYSLOG_SWITCHING_SENDER_POOL_SIZE];
static struct SolidSyslogSwitchingSender SwitchingSender_Pool[SOLIDSYSLOG_SWITCHING_SENDER_POOL_SIZE];
Expand Down Expand Up @@ -77,7 +77,7 @@ void SolidSyslogSwitchingSender_Destroy(struct SolidSyslogSender* base)
}
}

static size_t SwitchingSender_IndexFromHandle(const struct SolidSyslogSender* base)
static inline size_t SwitchingSender_IndexFromHandle(const struct SolidSyslogSender* base)
{
size_t result = SOLIDSYSLOG_SWITCHING_SENDER_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_SWITCHING_SENDER_POOL_SIZE; poolIndex++)
Expand All @@ -91,7 +91,7 @@ static size_t SwitchingSender_IndexFromHandle(const struct SolidSyslogSender* ba
return result;
}

static void SwitchingSender_CleanupAtIndex(size_t index, void* context)
static inline void SwitchingSender_CleanupAtIndex(size_t index, void* context)
{
(void) context;
SwitchingSender_Cleanup(&SwitchingSender_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogTimeQualitySdStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

struct SolidSyslogStructuredData;

static size_t TimeQualitySd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static void TimeQualitySd_CleanupAtIndex(size_t index, void* context);
static inline size_t TimeQualitySd_IndexFromHandle(const struct SolidSyslogStructuredData* base);
static inline void TimeQualitySd_CleanupAtIndex(size_t index, void* context);

static bool TimeQualitySd_InUse[SOLIDSYSLOG_TIME_QUALITY_SD_POOL_SIZE];
static struct SolidSyslogTimeQualitySd TimeQualitySd_Pool[SOLIDSYSLOG_TIME_QUALITY_SD_POOL_SIZE];
Expand Down Expand Up @@ -59,7 +59,7 @@ void SolidSyslogTimeQualitySd_Destroy(struct SolidSyslogStructuredData* base)
}
}

static size_t TimeQualitySd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
static inline size_t TimeQualitySd_IndexFromHandle(const struct SolidSyslogStructuredData* base)
{
size_t result = SOLIDSYSLOG_TIME_QUALITY_SD_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_TIME_QUALITY_SD_POOL_SIZE; poolIndex++)
Expand All @@ -73,7 +73,7 @@ static size_t TimeQualitySd_IndexFromHandle(const struct SolidSyslogStructuredDa
return result;
}

static void TimeQualitySd_CleanupAtIndex(size_t index, void* context)
static inline void TimeQualitySd_CleanupAtIndex(size_t index, void* context)
{
(void) context;
TimeQualitySd_Cleanup(&TimeQualitySd_Pool[index].Base);
Expand Down
8 changes: 4 additions & 4 deletions Core/Source/SolidSyslogUdpSenderStatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
struct SolidSyslogSender;

static bool UdpSender_IsValidConfig(const struct SolidSyslogUdpSenderConfig* config);
static size_t UdpSender_IndexFromHandle(const struct SolidSyslogSender* base);
static void UdpSender_CleanupAtIndex(size_t index, void* context);
static inline size_t UdpSender_IndexFromHandle(const struct SolidSyslogSender* base);
static inline void UdpSender_CleanupAtIndex(size_t index, void* context);

static bool UdpSender_InUse[SOLIDSYSLOG_UDP_SENDER_POOL_SIZE];
static struct SolidSyslogUdpSender UdpSender_Pool[SOLIDSYSLOG_UDP_SENDER_POOL_SIZE];
Expand Down Expand Up @@ -77,7 +77,7 @@ static bool UdpSender_IsValidConfig(const struct SolidSyslogUdpSenderConfig* con
return valid;
}

static size_t UdpSender_IndexFromHandle(const struct SolidSyslogSender* base)
static inline size_t UdpSender_IndexFromHandle(const struct SolidSyslogSender* base)
{
size_t result = SOLIDSYSLOG_UDP_SENDER_POOL_SIZE;
for (size_t poolIndex = 0; poolIndex < SOLIDSYSLOG_UDP_SENDER_POOL_SIZE; poolIndex++)
Expand All @@ -91,7 +91,7 @@ static size_t UdpSender_IndexFromHandle(const struct SolidSyslogSender* base)
return result;
}

static void UdpSender_CleanupAtIndex(size_t index, void* context)
static inline void UdpSender_CleanupAtIndex(size_t index, void* context)
{
(void) context;
UdpSender_Cleanup(&UdpSender_Pool[index].Base);
Expand Down
29 changes: 29 additions & 0 deletions DEVLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Dev Log

## 2026-05-20 — chore: `*Static.c` helper functions to `static inline`

Mechanical sweep over every `*Static.c` file across Core, Posix and Windows
(23 files) to mark `IndexFromHandle` and `CleanupAtIndex` `static inline`
rather than plain `static`. Flagged as a CodeRabbit nit on S11.07's
`SolidSyslogWinsockResolverStatic.c`; the rule applies to the whole family
and the inconsistency had drifted across S11.01 / S11.04 / S11.05 / S11.06 /
S11.07.

Scope is narrow on purpose:

- Only the two mechanical pool helpers (`IndexFromHandle`, `CleanupAtIndex`)
in each `*Static.c` get `inline`. They're 5- and 3-liners — natural inline
candidates. The forward declarations and definitions both gain the
`inline` keyword in the same line edit.
- The handful of larger `*Static.c` helpers — `BlockStore_ResolveSecurityPolicy`,
`BlockStore_BuildBlockSequenceConfig`, `MetaSd_IsValidConfig`,
`SwitchingSender_IsValidConfig`, `UdpSender_IsValidConfig` — are
deliberately *not* touched. They carry real branching logic and are not
inline candidates; their placement at file end is a separate concern
(CLAUDE.md "defined immediately beneath the function that first calls
them") that would expand this chore's scope materially.

Per-class delta: 4 lines changed per file (two forward decls + two
definitions). No behaviour change. MSVC build + full 1131-test suite green
locally. Linux smoke + tidy + iwyu skipped by user judgement — the change
is text-substitution-of-a-keyword on a fixed-format pair of identifiers,
trusted to CI.

## 2026-05-20 — S11.07: Windows adapters onto PoolAllocator

Closes S11.07 (#406). The second platform-adapter sweep in E11 — applies the
Expand Down
Loading
Loading