MadeStone

What Volatile Means (and Doesn’t Mean) in C++ Programming - Ben Saks - CppCon 2024

Просмотры:
12
Дата загрузки:
15.11.2024 21:16
Длительность:
01:02:10
Категория:
Технологии и интернет

Описание

#cpp #cppcon

What Volatile Means (and Doesn’t Mean) in C++ Programming - Ben Saks - CppCon 2024
Slides: https://github.com/CppCon/CppCon2024/blob/main/Presentations/What_Volatile_Means_%28and_Doesn%27t_Mean%29.pdf
---

Using the volatile keyword correctly is vital when accessing hardware devices in C++. Unfortunately, the volatile keyword is among the most misunderstood aspects of the language. If you don’t use volatile appropriately, you may find the compiler generating code that’s very different from what you intended.

This session will help you write more robust device drivers that avoid common mistakes surrounding volatile. Step by step, it explains:

Why volatile is necessary
How volatile affects the code that the compiler generates
How you should place volatile in object declarations
Which statements the compiler is and isn’t allowed to reorder around accesses to volatile objects
How to avoid misusing volatile
How to avoid introducing inefficiencies when using volatile objects

---
Ben Saks

Ben Saks is the chief engineer of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. Ben has represented Saks & Associates on the ISO C++ Standards committee as well as two of the committee’s study groups: SG14 (low-latency) and SG20 (education). He has spoken at industry conferences, including the C++ and System Software Summit, the Embedded Systems Conference, NDC Techtown, and CppCon, where he’s also chair of the Embedded Track and a member of the program committee. Ben previously worked as a software engineer for Vorne Industries, where he used C++ and JavaScript to develop embedded systems that help improve manufacturing productivity in factories all over the world. He’s also a contributing author on multiple Vorne patents.

https://www.youtube.com/watch?v=GeblxEQIPFM

Источники:

Рекомендуемые видео