Menu

#1586 MemoryBarrier macro

closed-fixed
2012-08-01
2011-10-07
Earnie Boyd
No

http://msdn.microsoft.com/en-us/library/ms684208\(VS.85).aspx

Just documenting we need to get this added to winnt.h for WINVER >= 0x0502

Discussion

  • Mark Mikofski

    Mark Mikofski - 2012-06-25

    Hi -- thanks for mingw! It is an indispensible tool for windows! Please consider bumping this issue. freedesktop.org dbus also uses the MemoryBarrier macro, so trying to compile without adding patch below will fail with mingw in current form (2012-06-25). The current mindset on mailing lists is that the patch should be applied to mingw (not dbus). Thanks! --Mark

    possible patch supplied by Mark Brand/Brad Pitcher for windows.h (or ?)
    __CRT_INLINE VOID MemoryBarrier(VOID)
    +{
    + LONG Barrier = 0;
    + __asm__ __volatile__("xchgl %%eax,%0 "
    + :"=r" (Barrier));
    +}

     
  • Mark Mikofski

    Mark Mikofski - 2012-06-25

    In fact, unfortunately, it appears as if freedesktop.org is not going to support mingw32 anymore, and they are switching to mingw-w64. The following bug status is listed as WONTFIX!
    https://bugs.freedesktop.org/show_bug.cgi?id=41423 - dbus Bugzilla Bug 41423 - MemoryBarrier only available on Vista+
    Any plans to merge or reunite mingw32 and mingw-w64?

     
  • Earnie Boyd

    Earnie Boyd - 2012-06-26

    <quote>In fact, unfortunately, it appears as if freedesktop.org is not going to
    support mingw32 anymore, and they are switching to mingw-w64.</quote>

    They are free to do so however, mingw-w64 contains some code from Wine and is therefore encumbered with GPL/LGPL copyleft. This causes 1) proprietary software issues 2) the inability to modify the license of you own project even if it is GPL.

    <quote>Any plans to merge or reunite mingw32 and mingw-w64?</quote>

    No, that is a dead issue. However, we will eventually get around to having our own 64 bit builds.

     
  • Mark Mikofski

    Mark Mikofski - 2012-06-26

    Any news on MemoryBarrier()?

     
  • Earnie Boyd

    Earnie Boyd - 2012-07-24
    • assigned_to: ir0nh34d --> earnie
     
  • Earnie Boyd

    Earnie Boyd - 2012-08-01
    • status: open --> closed-fixed
     
  • Earnie Boyd

    Earnie Boyd - 2012-08-01

    The problem you report has caused modification in some fashion in
    the official CVS for the given package. The w32api and
    mingw-runtime official CVS reside in the winsup CVS directory tree for Cygwin. If you still find problems then please open a
    new report.

     
MongoDB Logo MongoDB