8285439: remove unused os::fsync
Reviewed-by: hseigel, dholmes
This commit is contained in:
parent
9d9f4e502f
commit
c5aa75dd81
@ -663,10 +663,6 @@ jlong os::lseek(int fd, jlong offset, int whence) {
|
||||
return (jlong) BSD_ONLY(::lseek) NOT_BSD(::lseek64)(fd, offset, whence);
|
||||
}
|
||||
|
||||
int os::fsync(int fd) {
|
||||
return ::fsync(fd);
|
||||
}
|
||||
|
||||
int os::ftruncate(int fd, jlong length) {
|
||||
return BSD_ONLY(::ftruncate) NOT_BSD(::ftruncate64)(fd, length);
|
||||
}
|
||||
|
@ -4977,21 +4977,6 @@ int os::get_fileno(FILE* fp) {
|
||||
return _fileno(fp);
|
||||
}
|
||||
|
||||
// This code is a copy of JDK's sysSync
|
||||
// from src/windows/hpi/src/sys_api_md.c
|
||||
// except for the legacy workaround for a bug in Win 98
|
||||
|
||||
int os::fsync(int fd) {
|
||||
HANDLE handle = (HANDLE)::_get_osfhandle(fd);
|
||||
|
||||
if ((!::FlushFileBuffers(handle)) &&
|
||||
(GetLastError() != ERROR_ACCESS_DENIED)) {
|
||||
// from winerror.h
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void os::flockfile(FILE* fp) {
|
||||
_lock_file(fp);
|
||||
}
|
||||
|
@ -549,7 +549,6 @@ class os: AllStatic {
|
||||
// the input pointer.
|
||||
static char* native_path(char *path);
|
||||
static int ftruncate(int fd, jlong length);
|
||||
static int fsync(int fd);
|
||||
static int get_fileno(FILE* fp);
|
||||
static void flockfile(FILE* fp);
|
||||
static void funlockfile(FILE* fp);
|
||||
|
Loading…
Reference in New Issue
Block a user