在 2026-6-10 21:20, Luca Bacci 写道:
Hello,

I want to implement weak interlocked functions (relaxed, acquire, release variants). 
As explained in 
https://github.com/mingw-w64/mingw-w64/blob/00349888/mingw-w64-headers/include/psdk_inc/intrin-impl.h#L12<https://github.com/mingw-w64/mingw-w64/blob/00349888007fef589c2604bf60d0ea14c0e2d606/mingw-w64-headers/include/psdk_inc/intrin-impl.h#L12>,
 interlocked functions come in three forms:


   1.
As MSVC intrinsics replacements (for example, _InterlockedExchange from 
intrin.h)
   2.
As Windows.h inline functions (InterlockedExchange from winnt.h)
   3.
As library functions

I don't understand the need for 3). Can anybody explain the need for library 
implementations?
There's possibility that some of them might not be inlined.

Maybe there's no such possibility; for example, many SSE intrinsics in GCC headers are `gnu_inline` and `always_inline`, but are not defined elsewhere.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to