[Vm-dev] [commit][3471] Integrate Monty's support for the fsync
primitive.
commits at squeakvm.org
commits at squeakvm.org
Sun Oct 4 16:51:01 UTC 2015
Revision: 3471
Author: eliot
Date: 2015-10-04 09:51:00 -0700 (Sun, 04 Oct 2015)
Log Message:
-----------
Integrate Monty's support for the fsync primitive.
Modified Paths:
--------------
trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
Modified: trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
===================================================================
--- trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c 2015-10-04 16:50:28 UTC (rev 3470)
+++ trunk/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c 2015-10-04 16:51:00 UTC (rev 3471)
@@ -297,6 +297,14 @@
return 1;
}
+sqInt sqFileSync(SQFile *f) {
+ /*
+ * sqFileFlush uses FlushFileBuffers which is equivalent to fsync on windows
+ * as long as WriteFile is used directly and no other buffering is done.
+ */
+ return sqFileFlush(SQFile *f);
+}
+
sqInt sqFileTruncate(SQFile *f, squeakFileOffsetType offset) {
win32FileOffset ofs;
ofs.offset = offset;
More information about the Vm-dev
mailing list