[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 593bbe: Provide a sqLowLevelMFence for MSVC

GitHub noreply at github.com
Sun Jul 24 22:17:59 UTC 2016


  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 593bbe6b4ebdd8b96d21dc903052734e7eb33391
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/593bbe6b4ebdd8b96d21dc903052734e7eb33391
  Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
  Date:   2016-07-24 (Sun, 24 Jul 2016)

  Changed paths:
    M platforms/Cross/vm/sqMemoryFence.h

  Log Message:
  -----------
  Provide a sqLowLevelMFence for MSVC

Note: use _ReadWriteBarrier as suggested by wikipedia:
https://en.wikipedia.org/wiki/Memory_ordering

Though windows documentation warns about deprecation:
https://msdn.microsoft.com/en-us/library/f20w0x5e.aspx


  Commit: 058bf1b1e67feb1b78dc6076c9b3e4eb60f5c4fa
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/058bf1b1e67feb1b78dc6076c9b3e4eb60f5c4fa
  Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
  Date:   2016-07-24 (Sun, 24 Jul 2016)

  Changed paths:
    M platforms/win32/plugins/FilePlugin/sqWin32File.h

  Log Message:
  -----------
  Underscore prefix for _alloca is required in MSVC

Note that this define is replicated in several files.


  Commit: 08fb35d957ff732d6c9b241511ab80b5de612fea
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/08fb35d957ff732d6c9b241511ab80b5de612fea
  Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
  Date:   2016-07-25 (Mon, 25 Jul 2016)

  Changed paths:
    M platforms/win32/vm/sqPlatformSpecific.h

  Log Message:
  -----------
  Provide bzero (macro) for MSVC

The maro is defined as ZeroMemory.
But ZeroMemory is itself a macro from <windows.h>, so we need this include file.
But <windows.h> has a typedef for boolean and conflicts with JPEGReaderWriterPlugin which  also has.
So we need to protect with HAVE_BOOLEAN macro


  Commit: 8e021faed5d57f61bf5e3e7d27acf6c6dc51cabd
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8e021faed5d57f61bf5e3e7d27acf6c6dc51cabd
  Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
  Date:   2016-07-25 (Mon, 25 Jul 2016)

  Changed paths:
    M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
    M platforms/win32/vm/sqPlatformSpecific.h

  Log Message:
  -----------
  Move the MSVC specifics for FilePlugin into SqPlatformSpecific.h

Note that FlushFileBuffers taks a file handle, while fsync takes a (level 2)  file number
So we need _get_osfhandle() like described at:
https://msdn.microsoft.com/en-us/library/ks2530z6.aspx
http://stackoverflow.com/questions/3989545/how-do-i-get-the-file-handle-from-the-fopen-file-structure


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/8f96b9f58fbb...8e021faed5d5


More information about the Vm-dev mailing list