This will allow embedded projects that provide their own threading library to use the <atomic> library.
Diff Detail
Event Timeline
I strongly feel like this should be part of a Freestanding effort with an overarching design. I haven't seen any of this yet.
So: I want this, but I want to know (and agree on) how we're going to do the rest, too.
I absolutely agree. The C++ committee has an ongoing effort to define "freestanding" better, and atomic is tentatively part of this. In particular, you really have to figure out what to do with atomics which aren't lock-free, you can't just turn it on without a rationale.
I don't think we want to move forward with this without being close to what the committee is doing, otherwise "baremetal" will just be some odd duckling.
This will allow embedded projects that provide their own threading library to use the <atomic> library.
These projects should provide atomics through the compiler's builtins. Is that what they do? Do you have details? Are there testbots to ensure we don't break that configuration?
I absolutely agree. The C++ committee has an ongoing effort to define "freestanding" better, and atomic is tentatively part of this. In particular, you really have to figure out what to do with atomics which aren't lock-free, you can't just turn it on without a rationale.
Ah, I didn't know there was a freestanding effort, thanks for that info.
These projects should provide atomics through the compiler's builtins. Is that what they do? Do you have details? Are there testbots to ensure we don't break that configuration?
This is for our C++ firmware that already uses std::atomic. We were using libstdc++ (where <atomic> can be used on its own), but have switched to libc++.
If we're not moving forward with this patch, can it be abandoned? I'd like to clean up the libc++ review queue.