~/talk

Making sense of Volatile

Talkat NDC TechTown 2022 · 2022-08-29..09-01· [c-and-cpp]
links:none on file
slides:none on file

Claim: "volatile" in C++ is usually the wrong tool for thread synchronization and is only appropriate for memory‑mapped I/O or CPU registers. Shows a small, working helper API: volatile_load/volatile_store functions and a typed register<Access,T> wrapper that enforce explicit volatile accesses and prevent accidental casts. Demonstrates why atomics or locks provide ordering and atomicity (use them for threads), explains pitfalls like memset/aliasing and += semantics, and recommends strict guidelines and isolated wrappers to avoid undefined behavior.

AI-written summary · about

  1. 0:00Introduction
  2. 4:35Languages
  3. 11:00Volatile
  4. 19:14Volatile semantics
  5. 32:11When to use volatile
  6. 38:49Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.