From 7510a729c6648a7c119089947954c26f8cfb1429 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sat, 1 Jan 2005 01:51:05 +0000 Subject: [PATCH] Fix my previous NtDelayExecution patch. Fix Cc function prototypes which were incorrect, and remove useless file. svn path=/trunk/; revision=12675 --- reactos/include/ddk/ccfuncs.h | 16 +++++++-------- reactos/include/defines.h | 1 - reactos/include/ntos/ntdef.h | 2 +- reactos/lib/kernel32/process/proc.c | 4 ++-- reactos/ntoskrnl/Makefile | 1 - reactos/ntoskrnl/cc/cacheman.c | 2 +- reactos/ntoskrnl/cc/copy.c | 31 +++++++++++++---------------- reactos/ntoskrnl/cc/misc.c | 11 ---------- reactos/ntoskrnl/cc/pin.c | 14 ++++++------- 9 files changed, 33 insertions(+), 49 deletions(-) delete mode 100644 reactos/ntoskrnl/cc/misc.c diff --git a/reactos/include/ddk/ccfuncs.h b/reactos/include/ddk/ccfuncs.h index 177a7b51cca..51205e3968c 100644 --- a/reactos/include/ddk/ccfuncs.h +++ b/reactos/include/ddk/ccfuncs.h @@ -1,7 +1,7 @@ #ifndef _NTOS_CCFUNCS_H #define _NTOS_CCFUNCS_H -/* $Id: ccfuncs.h,v 1.10 2004/08/21 20:18:07 tamlin Exp $ */ +/* $Id$ */ #ifdef __cplusplus extern "C" { @@ -62,7 +62,7 @@ CcDeferWrite ( IN BOOLEAN Retrying ); -BOOLEAN +VOID STDCALL CcFastCopyRead ( IN PFILE_OBJECT FileObject, @@ -73,11 +73,11 @@ CcFastCopyRead ( OUT PIO_STATUS_BLOCK IoStatus ); -BOOLEAN +VOID STDCALL CcFastCopyWrite ( IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, + IN ULONG FileOffset, IN ULONG Length, IN PVOID Buffer ); @@ -191,7 +191,7 @@ CcPinMappedData ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb ); @@ -201,7 +201,7 @@ CcPinRead ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb, OUT PVOID * Buffer ); @@ -223,7 +223,7 @@ CcPreparePinWrite ( IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Zero, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb, OUT PVOID * Buffer ); @@ -251,7 +251,7 @@ CcRepinBcb ( IN PVOID Bcb ); -VOID +PVOID STDCALL CcRemapBcb ( IN PVOID Bcb diff --git a/reactos/include/defines.h b/reactos/include/defines.h index 703692578ba..961a9ce3463 100644 --- a/reactos/include/defines.h +++ b/reactos/include/defines.h @@ -2243,7 +2243,6 @@ extern "C" { #define WAIT_IO_COMPLETION (0xc0L) #define WAIT_ABANDONED (0x80L) #define WAIT_FAILED (0xffffffffL) -#define MAXIMUM_WAIT_OBJECTS (0x40) #define MAXIMUM_SUSPEND_COUNT (0x7f) /* MultiByteToWideChar */ diff --git a/reactos/include/ntos/ntdef.h b/reactos/include/ntos/ntdef.h index ccc5369f3b8..e9a6b6aa341 100644 --- a/reactos/include/ntos/ntdef.h +++ b/reactos/include/ntos/ntdef.h @@ -11,7 +11,7 @@ #ifndef __INCLUDE_NTDEF_H #define __INCLUDE_NTDEF_H -#ifndef _USE_W32API +#ifndef __USE_W32API #define MAXIMUM_WAIT_OBJECTS (64) #endif diff --git a/reactos/lib/kernel32/process/proc.c b/reactos/lib/kernel32/process/proc.c index 7cc029cf657..d90490dffca 100644 --- a/reactos/lib/kernel32/process/proc.c +++ b/reactos/lib/kernel32/process/proc.c @@ -1,4 +1,4 @@ -/* $Id: proc.c,v 1.72 2004/11/05 12:26:55 ekohl Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -447,7 +447,7 @@ DWORD STDCALL SleepEx(DWORD dwMilliseconds, BOOL bAlertable) { - TIME Interval; + LARGE_INTEGER Interval; NTSTATUS errCode; if (dwMilliseconds != INFINITE) diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index 37b0a992c6a..0e9393f6a0f 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -356,7 +356,6 @@ OBJECTS_CC = \ cc/fs.o \ cc/pin.o \ cc/mdl.o \ - cc/misc.o \ cc/view.o # Kernel Debugger Support (Kd) diff --git a/reactos/ntoskrnl/cc/cacheman.c b/reactos/ntoskrnl/cc/cacheman.c index 7dd5d94fd8a..f174859aa73 100644 --- a/reactos/ntoskrnl/cc/cacheman.c +++ b/reactos/ntoskrnl/cc/cacheman.c @@ -60,7 +60,7 @@ CcGetFlushedValidData ( /* * @unimplemented */ -VOID +PVOID STDCALL CcRemapBcb ( IN PVOID Bcb diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index 816db20b42e..0d34be9d140 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -1,4 +1,4 @@ -/* $Id: copy.c,v 1.32 2004/12/30 18:30:05 ion Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -556,34 +556,31 @@ CcDeferWrite ( /* * @unimplemented */ -BOOLEAN +VOID STDCALL CcFastCopyRead ( - IN PFILE_OBJECT FileObject, - IN ULONG FileOffset, - IN ULONG Length, - IN ULONG PageCount, - OUT PVOID Buffer, - OUT PIO_STATUS_BLOCK IoStatus + IN PFILE_OBJECT FileObject, + IN ULONG FileOffset, + IN ULONG Length, + IN ULONG PageCount, + OUT PVOID Buffer, + OUT PIO_STATUS_BLOCK IoStatus ) { UNIMPLEMENTED; - return FALSE; } /* * @unimplemented */ -BOOLEAN +VOID STDCALL -CcFastCopyWrite ( - IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN PVOID Buffer - ) +CcFastCopyWrite( + IN PFILE_OBJECT FileObject, + IN ULONG FileOffset, + IN ULONG Length, + IN PVOID Buffer) { UNIMPLEMENTED; - return FALSE; } /* diff --git a/reactos/ntoskrnl/cc/misc.c b/reactos/ntoskrnl/cc/misc.c deleted file mode 100644 index 34000e71ac4..00000000000 --- a/reactos/ntoskrnl/cc/misc.c +++ /dev/null @@ -1,11 +0,0 @@ -/* INCLUDES ******************************************************************/ - -#include -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - -#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) -#define ROUND_DOWN(N, S) (((N) % (S)) ? ROUND_UP(N, S) - S : N) - diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index fa9d68bd45e..de20a1ae947 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -1,4 +1,4 @@ -/* $Id: pin.c,v 1.18 2004/10/22 20:11:11 ekohl Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -117,7 +117,7 @@ CcPinMappedData ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb ) { @@ -134,14 +134,14 @@ CcPinRead ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb, OUT PVOID * Buffer ) { - if (CcMapData(FileObject, FileOffset, Length, Wait, Bcb, Buffer)) + if (CcMapData(FileObject, FileOffset, Length, Flags, Bcb, Buffer)) { - if (CcPinMappedData(FileObject, FileOffset, Length, Wait, Bcb)) + if (CcPinMappedData(FileObject, FileOffset, Length, Flags, Bcb)) return TRUE; else CcUnpinData(Bcb); @@ -159,7 +159,7 @@ CcPreparePinWrite ( IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Zero, - IN BOOLEAN Wait, + IN ULONG Flags, OUT PVOID * Bcb, OUT PVOID * Buffer ) @@ -172,7 +172,7 @@ CcPreparePinWrite ( * For now calling CcPinRead is better than returning error or * just having UNIMPLEMENTED here. */ - return CcPinRead(FileObject, FileOffset, Length, Wait, Bcb, Buffer); + return CcPinRead(FileObject, FileOffset, Length, Flags, Bcb, Buffer); } /*