
23 Sep
2013
23 Sep
'13
1:48 p.m.
Andrey Semashev wrote:
The macros are supposed to provide low level atomic ops on Windows, aren't they? Wouldn't it be better to use gcc atomic intrinsics instead of WinAPI calls in case of MinGW?
No, the macros were supposed to be a portable way of accessing the Interlocked* family of WinAPI calls without having to #include <windows.h>. That's probably why shared_ptr doesn't have a problem on MingW64 - it uses a g++ specific implementation there. (Interlocked* later mutated into compiler intrinsics.)