From: Tudor Bosman Date: Sat, 11 May 2013 21:35:43 +0000 (-0700) Subject: Add fsyncNoInt, fdatasyncNoInt X-Git-Tag: v0.22.0~974 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa0a656977742d967cc743be6245f50669c08380;p=folly.git Add fsyncNoInt, fdatasyncNoInt Test Plan: compiled file_util_test Reviewed By: soren@fb.com FB internal diff: D809250 --- diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index 2d4573dc..690280b9 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -41,6 +41,14 @@ int closeNoInt(int fd) { return r; } +int fsyncNoInt(int fd) { + return wrapNoInt(fsync, fd); +} + +int fdatasyncNoInt(int fd) { + return wrapNoInt(fdatasync, fd); +} + ssize_t readNoInt(int fd, void* buf, size_t count) { return wrapNoInt(read, fd, buf, count); } diff --git a/folly/FileUtil.h b/folly/FileUtil.h index 9d65bf53..67e19213 100644 --- a/folly/FileUtil.h +++ b/folly/FileUtil.h @@ -31,6 +31,8 @@ namespace folly { * semantics of underlying system calls. */ int closeNoInt(int fd); +int fsyncNoInt(int fd); +int fdatasyncNoInt(int fd); ssize_t readNoInt(int fd, void* buf, size_t n); ssize_t preadNoInt(int fd, void* buf, size_t n, off_t offset);