Add support for atomicFetchAdd and atomicFetchSub#193
Add support for atomicFetchAdd and atomicFetchSub#193kinke merged 1 commit intoldc-developers:ldcfrom rymrg:atomic_fadd
Conversation
|
Oh I didn't realize there are public wrappers in |
|
You're right. If I don't use a self built version they don't work. How can I help in adding this for next version? Atomic variables cannot be implemented without this. /usr/include/dlang/ldc/core/internal/atomic.d(32,28): Error: llvm_atomic_store cannot be interpreted at compile time, because it has no available source code |
This PR should suffice; please fix the indentation, add an empty line inbetween both new functions, and move them after
While looking at the upstream code, I've noticed a copy-paste error - |
|
Done. I'm not sure how I got the error message from earlier as I cannot reproduce it right now (it was with atomicStore which is required for atomic assignment). |
|
Thx! |
Add support for atomicFetchAdd and atomicFetchSub.
https://dlang.org/phobos/core_atomic.html#.atomicFetchAdd
https://dlang.org/phobos/core_atomic.html#.atomicFetchSub