Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ typedef struct _SECURITY_ATTRIBUTES {
#define FILE_ATTRIBUTE_NORMAL 0x00000080

#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_NO_BUFFERING 0x20000000
#define FILE_FLAG_RANDOM_ACCESS 0x10000000
#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#cmakedefine01 HAVE_SIGALTSTACK
#cmakedefine01 HAVE_VM_ALLOCATE
#cmakedefine01 HAVE_VM_READ
#cmakedefine01 HAVE_DIRECTIO
#cmakedefine01 HAVE_SEMAPHORE_H
#cmakedefine01 HAS_SYSV_SEMAPHORES
#cmakedefine01 HAS_PTHREAD_MUTEXES
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ int main(int argc, char **argv) {
}" HAVE_SIGALTSTACK)
check_function_exists(vm_allocate HAVE_VM_ALLOCATE)
check_function_exists(vm_read HAVE_VM_READ)
check_function_exists(directio HAVE_DIRECTIO)
check_function_exists(semget HAS_SYSV_SEMAPHORES)
check_function_exists(pthread_mutex_init HAS_PTHREAD_MUTEXES)
check_function_exists(ttrace HAVE_TTRACE)
Expand Down
38 changes: 0 additions & 38 deletions src/coreclr/pal/src/file/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ typedef enum
#define PAL_LEGAL_FLAGS_ATTRIBS (FILE_ATTRIBUTE_NORMAL| \
FILE_FLAG_SEQUENTIAL_SCAN| \
FILE_FLAG_WRITE_THROUGH| \
FILE_FLAG_NO_BUFFERING| \
FILE_FLAG_RANDOM_ACCESS| \
FILE_FLAG_BACKUP_SEMANTICS)

Expand Down Expand Up @@ -576,18 +575,6 @@ CorUnix::InternalCreateFile(
goto done;
}

if ( dwFlagsAndAttributes & FILE_FLAG_NO_BUFFERING )
{
TRACE("I/O will be unbuffered\n");
#ifdef O_DIRECT
open_flags |= O_DIRECT;
#endif
}
else
{
TRACE("I/O will be buffered\n");
}

filed = InternalOpen(lpUnixPath, open_flags, create_flags);
TRACE("Allocated file descriptor [%d]\n", filed);

Expand All @@ -606,31 +593,6 @@ CorUnix::InternalCreateFile(
dwCreationDisposition == OPEN_ALWAYS) &&
!fFileExists;

#ifndef O_DIRECT
if ( dwFlagsAndAttributes & FILE_FLAG_NO_BUFFERING )
{
#ifdef F_NOCACHE
if (-1 == fcntl(filed, F_NOCACHE, 1))
{
ASSERT("Can't set F_NOCACHE; fcntl() failed. errno is %d (%s)\n",
errno, strerror(errno));
palError = ERROR_INTERNAL_ERROR;
goto done;
}
#elif HAVE_DIRECTIO
if (-1 == directio(filed, DIRECTIO_ON))
{
ASSERT("Can't set DIRECTIO_ON; directio() failed. errno is %d (%s)\n",
errno, strerror(errno));
palError = ERROR_INTERNAL_ERROR;
goto done;
}
#else
#error Insufficient support for uncached I/O on this platform
#endif
}
#endif

/* make file descriptor close-on-exec; inheritable handles will get
"uncloseonexeced" in CreateProcess if they are actually being inherited*/
if(-1 == fcntl(filed,F_SETFD, FD_CLOEXEC))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BOOL Cleanup_CreateFileA_test1(void)
BOOL bRet = TRUE; // assume success

// loop through all accesses, modes, dispositions and flags
for (i=0; i<4*8*4*5; ++i) {
for (i=0; i<4*8*4*4; ++i) {
sprintf_s(FileName, ARRAY_SIZE(FileName), "test%03d.txt", i);
if (DeleteFileA(FileName) == FALSE) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
Expand Down Expand Up @@ -57,11 +57,10 @@ PALTEST(file_io_CreateFileA_test1_paltest_createfilea_test1, "file_io/CreateFile
CREATE_ALWAYS, // 1
OPEN_EXISTING, // 2
OPEN_ALWAYS}; // 3
DWORD dwFlagsAttrib[5] = {FILE_ATTRIBUTE_NORMAL, // 0
DWORD dwFlagsAttrib[4] = {FILE_ATTRIBUTE_NORMAL, // 0
FILE_FLAG_SEQUENTIAL_SCAN, // 1
FILE_FLAG_WRITE_THROUGH, // 2
FILE_FLAG_NO_BUFFERING, // 3
FILE_FLAG_RANDOM_ACCESS}; // 4
FILE_FLAG_RANDOM_ACCESS}; // 3
HANDLE hTemplate = NULL;


Expand Down Expand Up @@ -95,7 +94,7 @@ PALTEST(file_io_CreateFileA_test1_paltest_createfilea_test1, "file_io/CreateFile
for (k = 0; k < 4; k++)
{
// creation disp loop
for (l = 0; l < 5; l++)
for (l = 0; l < 4; l++)
{
sprintf_s(lpFileName, ARRAY_SIZE(lpFileName), "test%03d.txt", nCounter);
hFile = CreateFile(lpFileName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BOOL Cleanup_CreateFileW_test1(void)
BOOL bRet = TRUE; // assume success

// loop through all accesses, modes, dispositions and flags
for (i=0; i<4*8*4*5; ++i) {
for (i=0; i<4*8*4*4; ++i) {
sprintf_s(FileName, ARRAY_SIZE(FileName), "test%03d.txt", i);
if (DeleteFileA(FileName) == FALSE) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
Expand Down Expand Up @@ -59,11 +59,10 @@ PALTEST(file_io_CreateFileW_test1_paltest_createfilew_test1, "file_io/CreateFile
CREATE_ALWAYS, // 1
OPEN_EXISTING, // 2
OPEN_ALWAYS}; // 3
DWORD dwFlagsAttrib[5] = {FILE_ATTRIBUTE_NORMAL, // 0
DWORD dwFlagsAttrib[4] = {FILE_ATTRIBUTE_NORMAL, // 0
FILE_FLAG_SEQUENTIAL_SCAN, // 1
FILE_FLAG_WRITE_THROUGH, // 2
FILE_FLAG_NO_BUFFERING, // 3
FILE_FLAG_RANDOM_ACCESS}; // 4
FILE_FLAG_RANDOM_ACCESS}; // 3
HANDLE hTemplate = NULL;


Expand Down Expand Up @@ -96,7 +95,7 @@ PALTEST(file_io_CreateFileW_test1_paltest_createfilew_test1, "file_io/CreateFile
for (k = 0; k < 4; k++)
{
// creation disp loop
for (l = 0; l < 5; l++)
for (l = 0; l < 4; l++)
{
sprintf_s(string, ARRAY_SIZE(string), "test%03d.txt", nCounter);
lpFileName = convert(string);
Expand Down
Loading