winapi-rs
winapi-rs copied to clipboard
InterlockedCompareExchange: badly named argument based on wrong MSDN documentation (header files)
https://docs.rs/kernel32-sys/0.2.2/i686-pc-windows-msvc/kernel32/fn.InterlockedCompareExchange.html
The error is understandable, as it is based on the kernel32 API, but the word Comperand
does not exist and is an old typo of Comparand
in Microsoft documentation: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-interlockedcompareexchangepointer
This error was fixed in the C# documentation:
https://docs.microsoft.com/en-us/dotnet/api/system.threading.interlocked.compareexchange?view=net-5.0#System_Threading_Interlocked_CompareExchange_System_UInt64__System_UInt64_System_UInt64_
See: https://en.wiktionary.org/wiki/comparand
Googling comperand
returns 45_000 results, mostly errors induced by Microsoft.
Googling comparand
returns 220_000 results and the top one is a math stackexchange discussion about the name of the term: https://english.stackexchange.com/questions/392587/whats-the-term-for-the-left-hand-side-of-a-comparison-operation/449264
:)