Maarten Lankhorst m.b.lankhorst@gmail.com writes:
Fix the definitions in winbase.h, and the inline assembly :)
There are still several problems with your assembly, and I don't understand why you want to reinvent the wheel when we have a perfectly fine interlocked_cmpxchg64 implementation already.
Hello Alexandre,
Alexandre Julliard wrote:
Maarten Lankhorst m.b.lankhorst@gmail.com writes:
Fix the definitions in winbase.h, and the inline assembly :)
There are still several problems with your assembly, and I don't understand why you want to reinvent the wheel when we have a perfectly fine interlocked_cmpxchg64 implementation already
I copied the 32-bits Interlocked64 definition from my patch, changed LONG64 to long long, and WINAPI to __attribute__((__stdcall__)) and then tried a few calls against the inline and it works fine and compare the returned and expected result, which seem to work for the case where it should replace, and where it shouldn't replace. Tests also run against the kernel32 assembly version. versionInterlockedCompareExchange64 when available.
The 64-bits InterlockedCompareExchange64 assembly call is copied from InterlockedCompareExchangePointer
What are the remaining problems then?
Cheers, Maarten.