* winsup.h: Turn on DEBUGGING by default for now.

This commit is contained in:
Christopher Faylor
2006-08-10 14:15:00 +00:00
parent 887e02e478
commit 44d67b9b31
5 changed files with 103 additions and 18 deletions

View File

@ -31,6 +31,7 @@ details. */
#include <winioctl.h>
#include <ntdef.h>
#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: