From 359fe88806743187a9f3c47b1de71534841b0d56 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 12 Aug 2004 06:04:21 +0000 Subject: [PATCH] Fixed/Added Stubs. Implemented PsRevertThreadToSelf svn path=/trunk/; revision=10503 --- reactos/include/ddk/fsfuncs.h | 6 +++++- reactos/include/ddk/psfuncs.h | 8 +++++++- reactos/include/ntos/rtl.h | 18 ++++++++++++++++- reactos/ntoskrnl/Makefile | 3 ++- reactos/ntoskrnl/fs/filelock.c | 26 +++++++++++++++++++++++- reactos/ntoskrnl/fs/mdl.c | 6 +++++- reactos/ntoskrnl/ke/dpc.c | 16 +-------------- reactos/ntoskrnl/ke/ipi.c | 36 ++++++++++++++++++++++++++++++++++ reactos/ntoskrnl/ps/create.c | 17 +++++++++++----- 9 files changed, 110 insertions(+), 26 deletions(-) create mode 100644 reactos/ntoskrnl/ke/ipi.c diff --git a/reactos/include/ddk/fsfuncs.h b/reactos/include/ddk/fsfuncs.h index 9dcd252badc..65e0b32e296 100644 --- a/reactos/include/ddk/fsfuncs.h +++ b/reactos/include/ddk/fsfuncs.h @@ -1,6 +1,6 @@ #ifndef __INCLUDE_DDK_FSFUNCS_H #define __INCLUDE_DDK_FSFUNCS_H -/* $Id: fsfuncs.h,v 1.26 2004/07/16 13:45:02 ion Exp $ */ +/* $Id: fsfuncs.h,v 1.27 2004/08/12 06:04:21 ion Exp $ */ #define FlagOn(x,f) ((x) & (f)) #include @@ -311,15 +311,19 @@ FsRtlGetNextMcbEntry (IN PMCB Mcb, #define FsRtlExitFileSystem KeLeaveCriticalRegion VOID +STDCALL FsRtlIncrementCcFastReadNotPossible( VOID ); VOID +STDCALL FsRtlIncrementCcFastReadWait( VOID ); VOID +STDCALL FsRtlIncrementCcFastReadNoWait( VOID ); VOID +STDCALL FsRtlIncrementCcFastReadResourceMiss( VOID ); VOID diff --git a/reactos/include/ddk/psfuncs.h b/reactos/include/ddk/psfuncs.h index ccd9c404750..0922cb5086d 100644 --- a/reactos/include/ddk/psfuncs.h +++ b/reactos/include/ddk/psfuncs.h @@ -1,4 +1,4 @@ -/* $Id: psfuncs.h,v 1.31 2004/07/21 01:05:26 ion Exp $ +/* $Id: psfuncs.h,v 1.32 2004/08/12 06:04:21 ion Exp $ */ #ifndef _INCLUDE_DDK_PSFUNCS_H #define _INCLUDE_DDK_PSFUNCS_H @@ -303,6 +303,12 @@ STDCALL PsRevertToSelf( VOID ); +VOID +STDCALL +PsRevertThreadToSelf( + IN struct _ETHREAD* Thread + ); + VOID STDCALL PsSetJobUIRestrictionsClass( PVOID /*PEJOB*/ Job, diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index fd9fe6c4bb8..a922f89fcdf 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -1,4 +1,4 @@ -/* $Id: rtl.h,v 1.32 2004/08/05 18:17:36 ion Exp $ +/* $Id: rtl.h,v 1.33 2004/08/12 06:04:21 ion Exp $ * */ #ifndef __DDK_RTL_H @@ -1622,6 +1622,15 @@ RtlIntegerToChar ( IN OUT PCHAR String ); +NTSTATUS +STDCALL +RtlIntegerToUnicode( + IN ULONG Value, + IN ULONG Base OPTIONAL, + IN ULONG Length OPTIONAL, + IN OUT LPWSTR String + ); + NTSTATUS STDCALL RtlIntegerToUnicodeString ( @@ -2746,6 +2755,13 @@ RtlWalkFrameChain ( IN ULONG Flags ); +ULONG +STDCALL +RtlZeroHeap( + IN PVOID HeapHandle, + IN ULONG Flags + ); + ULONG STDCALL RtlxAnsiStringToUnicodeSize ( diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index b1b9b6268f2..481ef5696d6 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.137 2004/08/10 12:05:20 ekohl Exp $ +# $Id: Makefile,v 1.138 2004/08/12 06:04:21 ion Exp $ # # ReactOS Operating System # @@ -140,6 +140,7 @@ OBJECTS_KE = \ ke/event.o \ ke/kqueue.o \ ke/kthread.o \ + ke/ipi.o \ ke/main.o \ ke/mutex.o \ ke/process.o \ diff --git a/reactos/ntoskrnl/fs/filelock.c b/reactos/ntoskrnl/fs/filelock.c index c170044e500..468ea4a4833 100644 --- a/reactos/ntoskrnl/fs/filelock.c +++ b/reactos/ntoskrnl/fs/filelock.c @@ -1,4 +1,4 @@ -/* $Id: filelock.c,v 1.12 2003/10/12 17:05:44 hbirr Exp $ +/* $Id: filelock.c,v 1.13 2004/08/12 06:04:21 ion Exp $ * * reactos/ntoskrnl/fs/filelock.c * @@ -1290,4 +1290,28 @@ FsRtlFreeFileLock( ExFreeToPagedLookasideList(&LockLookaside, FileLock); } +/* + * @unimplemented + */ +VOID +STDCALL +FsRtlAcquireFileExclusive( + IN PFILE_OBJECT FileObject + ) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +STDCALL +FsRtlReleaseFile( + IN PFILE_OBJECT FileObject + ) +{ + UNIMPLEMENTED; +} + /* EOF */ diff --git a/reactos/ntoskrnl/fs/mdl.c b/reactos/ntoskrnl/fs/mdl.c index 0855039fede..78fc379a646 100644 --- a/reactos/ntoskrnl/fs/mdl.c +++ b/reactos/ntoskrnl/fs/mdl.c @@ -1,4 +1,4 @@ -/* $Id: mdl.c,v 1.6 2004/06/23 00:42:21 ion Exp $ +/* $Id: mdl.c,v 1.7 2004/08/12 06:04:21 ion Exp $ * * reactos/ntoskrnl/fs/mdl.c * @@ -13,6 +13,7 @@ * @unimplemented */ VOID +STDCALL FsRtlIncrementCcFastReadResourceMiss( VOID ) { UNIMPLEMENTED; @@ -22,6 +23,7 @@ FsRtlIncrementCcFastReadResourceMiss( VOID ) * @unimplemented */ VOID +STDCALL FsRtlIncrementCcFastReadNotPossible( VOID ) { UNIMPLEMENTED; @@ -31,6 +33,7 @@ FsRtlIncrementCcFastReadNotPossible( VOID ) * @unimplemented */ VOID +STDCALL FsRtlIncrementCcFastReadWait( VOID ) { UNIMPLEMENTED; @@ -40,6 +43,7 @@ FsRtlIncrementCcFastReadWait( VOID ) * @unimplemented */ VOID +STDCALL FsRtlIncrementCcFastReadNoWait( VOID ) { UNIMPLEMENTED; diff --git a/reactos/ntoskrnl/ke/dpc.c b/reactos/ntoskrnl/ke/dpc.c index bbbfdf85e5c..0b20e546398 100644 --- a/reactos/ntoskrnl/ke/dpc.c +++ b/reactos/ntoskrnl/ke/dpc.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dpc.c,v 1.32 2004/07/29 23:28:31 jimtabor Exp $ +/* $Id: dpc.c,v 1.33 2004/08/12 06:04:21 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -283,18 +283,4 @@ KeInitDpc(VOID) KeInitializeSpinLock(&DpcQueueLock); } -/* - * @unimplemented - * -STDCALL -BOOLEAN -KiIpiServiceRoutine( - IN PKTRAP_FRAME TrapFrame, - IN PKEXCEPTION_FRAME ExceptionFrame -) -{ - UNIMPLEMENTED; - return FALSE; -}*/ - /* EOF */ diff --git a/reactos/ntoskrnl/ke/ipi.c b/reactos/ntoskrnl/ke/ipi.c new file mode 100644 index 00000000000..2a2d5e6b3ff --- /dev/null +++ b/reactos/ntoskrnl/ke/ipi.c @@ -0,0 +1,36 @@ +/* $Id: ipi.c,v 1.1 2004/08/12 06:04:21 ion Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/ipi.c + * PURPOSE: IPI Routines (Inter-Processor Interrupts). NT5+ + * PROGRAMMER: Alex Ionescu (alex@relsoft.net) + * UPDATE HISTORY: + * Created 11/08/2004 + */ + +/* INCLUDES *****************************************************************/ + +#include +#include + +#define NDEBUG +#include + +/* FUNCTIONS *****************************************************************/ + +/* + * @unimplemented + */ +STDCALL +BOOLEAN +KiIpiServiceRoutine( + IN PKTRAP_FRAME TrapFrame, + IN PKEXCEPTION_FRAME ExceptionFrame +) +{ + UNIMPLEMENTED; + return FALSE; +} + +/* EOF */ diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index 6fcb0634f0a..bba462e7d70 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.77 2004/08/07 19:13:26 ion Exp $ +/* $Id: create.c,v 1.78 2004/08/12 06:04:21 ion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -104,10 +104,18 @@ PsAssignImpersonationToken(PETHREAD Thread, VOID STDCALL PsRevertToSelf (VOID) { - PETHREAD Thread; - - Thread = PsGetCurrentThread (); + PsRevertThreadToSelf(PsGetCurrentThread()); +} +/* + * @implemented + */ +VOID +STDCALL +PsRevertThreadToSelf( + IN PETHREAD Thread + ) +{ if (Thread->ActiveImpersonationInfo == TRUE) { ObDereferenceObject (Thread->ImpersonationInfo->Token); @@ -115,7 +123,6 @@ PsRevertToSelf (VOID) } } - /* * @implemented */