D using x86 CMPXCHG Compare-and-swap

I am looking for a function that represents the D atomic CAS interface on Intel x86.

I know that I can do this using the built-in ASM (and if necessary, I will), but I would prefer to just take the code from someone else if I can.

+3
source share
1 answer

From the documentation at: http://www.digitalmars.com/d/2.0/overview.html

Inline assembler

, , , , . D , . , DLL.

D -, ..

, CMPXCHG .


Edit

: http://www.dsource.org/projects/tango/browser/trunk/tango/core/Atomic.d?rev=4277

- , CMPXCHG , .

+4

Source: https://habr.com/ru/post/1704294/


All Articles