Explore tweets tagged as #stdatomic
C++23 新機能解説に 1 項目追加しました。「C 言語との atomics の互換を目的とした標準ライブラリヘッダ <stdatomic.h>」.| cppmap
0
6
24
the lack of C11 <stdatomic.h> in the MSVC standard library is a bit of a problem, but after studying <intrin.h> I think it is possible to implement one using the _Interlocked intrinsics plus _ReadBarrier, _WriteBarrier and _ReadWriteBarrier but this caution is a worry.
1
0
1
0
0
0
0
0
0
0
0
0
C++11: are 16-byte atomic<> variables automatically aligned on 16-byte boundaries allowing CMPXCHG16B instruction? #compareandswap #memoryalignment #stdatomic #cpp #x8664
0
0
0
Force release and acquire ordering for fetch and add with load/store #stdatomic #cpp #memorybarriers #atomic
0
0
0
What's the difference between T, volatile T, and std::atomic<T>? #stdatomic #cpp #cpp11 #multithreading #concurrency
0
0
0
OH SHIT. We got a red alert emergency Sega #Dreamcast situation here! Thanks to C++ not bothering to get off its ass to support C's <stdatomic.h> until C++23, do NOT try to pull and build KOS's master branch until this PR is merged! #cpp #opensource
3
5
26
Atomic function pointer call compiles in gcc, but not in clang and msvc #languagelawyer #cpp #stdatomic #atomic
0
0
0
そもそも C とかいう一応別言語のヘッダとかをそのまま埋め込んで大抵はそれらしく動くというのがヤバいし、互換性のバケモノという感じがしていたので、 stdatomic.h が C++20 まででサポートされていないのを見て私ははじめて C++ に安心感とか親しみのようなものを感じました (なお C++23 は).
1
1
20
dispatch_once_f 소스코드 보다가 stdatomic.h라는게 있네. 이걸로 Thread-safe를 보장해주고 있나보네.보니 재밌어 보이는 것들이 많네
0
0
3
C++でOS自作するときのハマりポイントは「C++でできる!OS自作入門」にまとめたけど、その後新たに発見したことがあるので第二版を出すのもいいかも。例えばlibc++の<atomic>はスレッドサポートがないと使えないから<stdatomic.h>で回避するしかないとか。
0
7
32
GHCのコード中にHAVE_C11_ATOMICSというマクロがあったのでコード検索をかけたらstdatomic.hではなくGCCの組み込み関数を直接呼び出していた回.
0
0
5
rubyでC11を前提にしていいなら"ruby_atomic.h"は<stdatomic.h>でだいぶ簡単にできるし、<stdnoreturn.h>も使い道が多そうだし、<stdalign.h>も多分便利だな。あと_Static_assertもあるか。.
2
0
2
It's #include <stdatomic.h> though (preferably I think with the std prefix). I don't even want to know.
0
0
0