summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/os_win/os_fsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/os_win/os_fsync.c')
-rw-r--r--src/third_party/wiredtiger/src/os_win/os_fsync.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/os_win/os_fsync.c b/src/third_party/wiredtiger/src/os_win/os_fsync.c
new file mode 100644
index 00000000000..cd509131649
--- /dev/null
+++ b/src/third_party/wiredtiger/src/os_win/os_fsync.c
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2008-2014 WiredTiger, Inc.
+ * All rights reserved.
+ *
+ * See the file LICENSE for redistribution information.
+ */
+
+#include "wt_internal.h"
+
+/*
+ * __wt_fsync --
+ * Flush a file handle.
+ */
+int
+__wt_fsync(WT_SESSION_IMPL *session, WT_FH *fh)
+{
+ WT_DECL_RET;
+
+ WT_RET(__wt_verbose(session, WT_VERB_FILEOPS, "%s: FlushFileBuffers",
+ fh->name));
+
+ if ((ret = FlushFileBuffers(fh->filehandle)) == FALSE)
+ WT_RET_MSG(session,
+ __wt_errno(), "%s FlushFileBuffers error", fh->name);
+
+ return (0);
+}
+
+/*
+ * __wt_fsync_async --
+ * Flush a file handle and don't wait for the result.
+ */
+int
+__wt_fsync_async(WT_SESSION_IMPL *session, WT_FH *fh)
+{
+ WT_UNUSED(session);
+ WT_UNUSED(fh);
+
+ return (0);
+}