Continue reading "Strongly Typed Integers and Registers in C++"
Exploiting the Preprocessor for Fun and Profit
Continue reading "Exploiting the Preprocessor for Fun and Profit"
Paper: What Every Systems Programmer Should Know About Lockless Concurrency
21 May 2020 by Phillip Johnston • Last updated 15 August 2023 “What Every Systems Programmer Should Know About Lockless Concurrency” is a short paper by Matt Kline that explores ways we can synchronize concurrent operations without relying on standard OS constructs, such as mutexes, semaphores, and condition variables. These strategies are also used to implement those same OS constructs. The paper also briefly touches on sources of concurrency problems that arise from compilers and from the hardware itself. Note: This paper was featured as a Reading Club assignment. Files What Every Systems Programmer Should Know About Lockless Concurrency Archive …
Continue reading “Paper: What Every Systems Programmer Should Know About Lockless Concurrency”
Enabling Users to Override Functions in C & C++
8 May 2020 by Phillip Johnston • Last updated 14 December 2021 There are many cases were we want to give our users the ability to override functions in a library or module. This is often for be for customization or optimization purposes. The Pattern With many C and C++ compilers, we can declare function and variable definitions as “weakly linked” using __attribute__((weak)) or the __weak alias: __attribute__((weak)) void weak_function() { // Intentional no-op } Note: While ELF allows you to declare a symbol with weak linkage and not supply a definition, this approach will fail with Mach-O objects and …
Continue reading “Enabling Users to Override Functions in C & C++”
Q&A: How can I use C++ on Embedded Projects when I can’t use the Heap?
Continue reading "Q&A: How can I use C++ on Embedded Projects when I can’t use the Heap?"
Enforce Correct Integer Arithmetic using the C++ Safe Numerics Library
Continue reading "Enforce Correct Integer Arithmetic using the C++ Safe Numerics Library"
Regular Expressions for Embedded C++
June 2019: Programmer vs Engineer, Coroutines, Report CI
3 June 2019 by Phillip Johnston • Last updated 27 September 2019 Welcome to the June 2019 edition of the Embedded Artistry Newsletter! This is a monthly newsletter of curated and original content to help you build superior embedded systems. This newsletter supplements the website and covers topics not mentioned there. This month we’ll cover: Programming vs engineeringCoroutinesReport CIEmbedded news from around the webUpdates to the Embedded Artistry Website We also want to share some exciting news with you! One of our articles was published in the June 2019 issue of the Software Quality Professional Journal. You can read The …
Continue reading “June 2019: Programmer vs Engineer, Coroutines, Report CI”
A General Overview of What Happens Before main()
Continue reading "A General Overview of What Happens Before main()"
Improve volatile Usage with volatile_load() and volatile_store()
Continue reading "Improve volatile Usage with volatile_load() and volatile_store()"
