---
title: "Scorchers, Part 3: Bare-Metal Concurrency With Double-Buffering and the Revolving Fireplace"
url: https://daily.dev/posts/scorchers-part-3-bare-metal-concurrency-with-double-buffering-and-the-revolving-fireplace-fv9gkdei2
source_url: https://www.embeddedrelated.com/showarticle/1360.php
type: article
source: "EmbeddedRelated"
published: 2026-05-31T07:47:48.687Z
updated: 2026-05-31T09:03:22.857Z
tags: ["c", "embedded"]
reading_time: 39
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scorchers, Part 3: Bare-Metal Concurrency With Double-Buffering and the Revolving Fireplace

**[EmbeddedRelated](https://daily.dev/sources/embeddedrelated)** · 39 min read · 0 upvotes · 0 comments

## Summary

A practical guide to implementing safe, low-overhead inter-process communication on bare-metal embedded systems using a double-buffering variant called the 'Revolving Fireplace.' The pattern enables an ISR (Speedy, running at 10kHz) and a non-real-time main loop (Poky) to exchange data without mutexes or blocking. Two concrete C implementations are presented: one where Poky switches the shared memory buffers, and one where Speedy handles the switch on request. The article also covers the atomicity and volatile requirements needed to make the mechanism correct, including a deep dive into C11 stdatomic.h, GCC builtins, and inline assembly alternatives for compilers lacking C11 support. Testing strategies using guard variables and a linear congruential generator for reproducible ADC mock data are also discussed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.embeddedrelated.com/showarticle/1360.php>

---

Tags: [#c](https://daily.dev/tags/c), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/scorchers-part-3-bare-metal-concurrency-with-double-buffering-and-the-revolving-fireplace-fv9gkdei2)
