From 44d67b9b31f86fc7dd359a097fa413eee85b6b35 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 10 Aug 2006 14:15:00 +0000 Subject: * winsup.h: Turn on DEBUGGING by default for now. --- winsup/cygwin/fhandler.cc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 00e987587..ae5edcb62 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -31,6 +31,7 @@ details. */ #include #include #include "ntdll.h" +#include "mmap_helper.h" static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */ @@ -223,10 +224,8 @@ fhandler_base::raw_read (void *ptr, size_t& ulen) HANDLE h = NULL; /* grumble */ int prio = 0; /* ditto */ - int try_noreserve = 1; DWORD len = ulen; -retry: ulen = (size_t) -1; if (read_state) { @@ -235,7 +234,7 @@ retry: SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL); signal_read_state (1); } - BOOL res = ReadFile (get_handle (), ptr, len, (DWORD *) &ulen, 0); + BOOL res = mmReadFile (get_handle (), ptr, len, (DWORD *) &ulen, 0); if (read_state) { signal_read_state (1); @@ -261,19 +260,6 @@ retry: bytes_read = 0; break; } - if (try_noreserve) - { - try_noreserve = 0; - switch (mmap_is_attached_or_noreserve (ptr, len)) - { - case MMAP_NORESERVE_COMMITED: - goto retry; - case MMAP_RAISE_SIGBUS: - raise(SIGBUS); - case MMAP_NONE: - break; - } - } /*FALLTHRU*/ case ERROR_INVALID_FUNCTION: case ERROR_INVALID_PARAMETER: -- cgit v1.2.3