This software is a small C library that enables the use of design patterns in deeply embedded applications. It is designed to be lightweight and easy to use.
UCommon introduces Objective-C-inspired design patterns like reference counted objects, memory pools, and smart pointers. It also offers dynamic typing through inline templates for pure type translation, tied to concrete base classes to avoid template instantiation issues. C auto-variable automation is used to simplify object deletion and thread lock release.
UCommon introduces portable C replacement functions, notably for sockets. It adds getaddrinfo for platforms that lack it and threadsafe versions of existing C library functions. Basic socket support for connecting to named destinations and multicast addresses is included, as is support for high-resolution timing and Posix realtime clocks.
While UCommon is influenced by GNU Common C, it introduces new concepts for handling thread locking and synchronization. All higher level thread synchronization objects are built directly from conditionals. This ensures that even platforms that lack certain synchronization objects still have them in UCommon. A consistent call methodology is used for all locks, whether mutex, rw, or semaphore, based on whether they are used for exclusive or shared locking.
Using UCommon requires knowledge of compiler switches and options to disable language features, C runtime, stdlibs, and associated headers. The current version supports GCC and the Sun Workshop compiler. UCommon may also be built with GCC cross compiling for mingw32 for Microsoft Windows targets. The minimum platform support for UCommon is a modern and working posix pthread threading library. UCommon does not support non-posix threading models such as Microsoft Windows threads or non-preemtive threading libraries like GNU pth, allowing for greater focus on Posix pthread exclusively.
Version 2.0.5: N/A