MemoryBarrier and MinGW
Earnie
earnie at users.sourceforge.net
Fri Oct 7 12:57:05 PDT 2011
Earnie wrote:
> Thiago Macieira wrote:
>> On Friday, 7 de October de 2011 13:57:39 Earnie Boyd wrote:
>>> Looking into the MSDN documentation for MemoryBarrier brings me
>>> to the sad conclusion that it is really part of the .NET services
>>> and not really part of Win32 API. However the Interlocked
>>> services is part of the API and should be used while
>>> MemoryBarrier should be conditioned.
>>>
>>> http://msdn.microsoft.com/en-us/library/ms684122(v=vs.85).aspx
>>>
>>> These are defined in Winbase.h in MinGW.
>>
>> http://msdn.microsoft.com/en-us/library/ms684208(VS.85).aspx
>>
>> It looks like it's part of the Win32 API, even though there's no
>> function with that name exported from any DLL. It's always inline
>> or a macro.
>
> Thanks for the link to the documentation, we can get it added to our
> headers however it has a minimum requirement of Vista and I'm on XP
> which doesn't help. So "#ifdef MemoryBarrier" may be a good work
> around to the issue.
Actually better use "#if WINVER >= 0x0502" which is the indicator for
Windows Server 2003.
Earnie
More information about the dbus
mailing list