Portable C/C++ Source Code Libraries
A collection of C/C++ source code libraries written by David Lafreniere for cross-platform embedded and PC-based software development.
GitHub source code repositories categorized by library type.
State Machines with Threads
Repository
Language
Description
C_StateMachineWithThreads
C
A C-language implementation of the Active Object pattern, featuring a thread-safe state machine with an integrated message queue.
StateMachineWithThreads
C++
A thread-safe C++ state machine utilizing std::thread to execute state transitions on a dedicated worker thread.
active-fsm
C++
A compact active-object C++ finite state machine providing RAII-safe asynchronous dispatch and pub/sub signals.
Repository
Language
Description
StdWorkerThread
C++
C++ std::thread event loop with message queue and timer.
ThreadWin
C++
Win32 CreateThread() C++ wrapper with synchronized thread startup.
Fixed-Block Memory Allocators
Repository
Language
Description
C_Allocator
C
C-language fixed-block memory allocator.
Allocator
C++
C++ fixed-block memory allocator.
xallocator
C++
A fixed-block allocator malloc/free replacement.
stl_allocator
C++
A std::allocator compatible fixed-block memory allocator for the C++ Standard Library.
pmr_allocator
C++
A C++ Polymorphic Memory Resource (PMR) fixed-block memory allocator.
Repository
Language
Description
SimpleSocketProtocol
C
A C-language socket-based communication transport protocol for Windows, Linux, Arduino and embedded systems.
DelegateMQ
C++
Invoke any remote function located in a separate process or processor using C++ delegates.
Repository
Language
Description
MessageSerialize
C++
C++ object binary serialize and deserialize.
Repository
Language
Description
CoreDump
C
Universal embedded systems core dump framework.
Repository
Language
Description
Async-SQLite
C++
An asynchronous SQLite thread-safe wrapper implemented using an asynchronous delegate library.
Async-DuckDB
C++
An asynchronous DuckDB thread-safe wrapper implemented using an asynchronous delegate library.
Repository
Language
Description
OBDII-Adapter-Software
C
OBDII adapter source code and schematic for automotive diagnostic vehicle communication.
The current C++ delegate implementation is DelegateMQ . The following delegate-related repositories offer prior implementations.
All libraries are licensed under the MIT License.