23 modified files
reactos/include/ddk
diff -u -r1.46 -r1.47
--- pstypes.h 22 Sep 2004 14:53:26 -0000 1.46
+++ pstypes.h 24 Oct 2004 20:37:25 -0000 1.47
@@ -74,6 +74,7 @@
} STACK_INFORMATION, *PSTACK_INFORMATION;
typedef ULONG THREADINFOCLASS;
+typedef ULONG PROCESSINFOCLASS;
struct _KPROCESS;
reactos/include
diff -u -r1.64 -r1.65
--- funcs.h 24 Oct 2004 16:49:48 -0000 1.64
+++ funcs.h 24 Oct 2004 20:37:25 -0000 1.65
@@ -1428,7 +1428,7 @@
NTSTATUS
STDCALL
NtMakePermanentObject(
- IN HANDLE Object
+ IN HANDLE ObjectHandle
);
NTSTATUS
reactos/include/ntos
diff -u -r1.36 -r1.37
--- rtl.h 23 Oct 2004 23:43:23 -0000 1.36
+++ rtl.h 24 Oct 2004 20:37:25 -0000 1.37
@@ -1,4 +1,4 @@
-/* $Id: rtl.h,v 1.36 2004/10/23 23:43:23 ion Exp $
+/* $Id: rtl.h,v 1.37 2004/10/24 20:37:25 weiden Exp $
*
*/
#ifndef __DDK_RTL_H
@@ -1535,10 +1535,10 @@
STDCALL
RtlInitializeContext (
IN HANDLE ProcessHandle,
- IN PCONTEXT Context,
- IN PVOID Parameter,
- IN PTHREAD_START_ROUTINE StartAddress,
- IN OUT PUSER_STACK UserStack
+ OUT PCONTEXT ThreadContext,
+ IN PVOID ThreadStartParam OPTIONAL,
+ IN PTHREAD_START_ROUTINE ThreadStartAddress,
+ IN PINITIAL_TEB InitialTeb
);
VOID
reactos/include/ntos
diff -u -r1.15 -r1.16
--- rtltypes.h 5 Aug 2004 18:17:36 -0000 1.15
+++ rtltypes.h 24 Oct 2004 20:37:26 -0000 1.16
@@ -1,4 +1,4 @@
-/* $Id: rtltypes.h,v 1.15 2004/08/05 18:17:36 ion Exp $
+/* $Id: rtltypes.h,v 1.16 2004/10/24 20:37:26 weiden Exp $
*
*/
@@ -189,14 +189,14 @@
} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
-typedef struct _USER_STACK
+typedef struct _INITIAL_TEB
{
- PVOID FixedStackBase;
- PVOID FixedStackLimit;
- PVOID ExpandableStackBase;
- PVOID ExpandableStackLimit;
- PVOID ExpandableStackBottom;
-} USER_STACK, *PUSER_STACK;
+ PVOID StackBase;
+ PVOID StackLimit;
+ PVOID StackCommit;
+ PVOID StackCommitMax;
+ PVOID StackReserved;
+} INITIAL_TEB, *PINITIAL_TEB;
#else /* __USE_W32API */
reactos/include/ntos
diff -u -r1.33 -r1.34
--- zw.h 24 Oct 2004 17:14:26 -0000 1.33
+++ zw.h 24 Oct 2004 20:37:26 -0000 1.34
@@ -1,5 +1,5 @@
-/* $Id: zw.h,v 1.33 2004/10/24 17:14:26 weiden Exp $
+/* $Id: zw.h,v 1.34 2004/10/24 20:37:26 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -997,19 +997,19 @@
NTSTATUS
STDCALL
NtCreateSymbolicLinkObject(
- OUT PHANDLE SymbolicLinkHandle,
+ OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING Name
+ IN PUNICODE_STRING LinkTarget
);
NTSTATUS
STDCALL
ZwCreateSymbolicLinkObject(
- OUT PHANDLE SymbolicLinkHandle,
+ OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING Name
+ IN PUNICODE_STRING LinkTarget
);
/*
@@ -1532,7 +1532,7 @@
* FUNCTION: Retrieves the processor context of a thread
* ARGUMENTS:
* ThreadHandle = Handle to a thread
- * Context (OUT) = Caller allocated storage for the processor context
+ * ThreadContext (OUT) = Caller allocated storage for the processor context
* RETURNS: Status
*/
@@ -1540,14 +1540,14 @@
STDCALL
NtGetContextThread(
IN HANDLE ThreadHandle,
- OUT PCONTEXT Context
+ OUT PCONTEXT ThreadContext
);
NTSTATUS
STDCALL
ZwGetContextThread(
IN HANDLE ThreadHandle,
- OUT PCONTEXT Context
+ OUT PCONTEXT ThreadContext
);
@@ -1587,19 +1587,19 @@
NTSTATUS
STDCALL
NtInitiatePowerAction (
- POWER_ACTION SystemAction,
- SYSTEM_POWER_STATE MinSystemState,
- ULONG Flags,
- BOOLEAN Asynchronous
+ IN POWER_ACTION SystemAction,
+ IN SYSTEM_POWER_STATE MinSystemState,
+ IN ULONG Flags,
+ IN BOOLEAN Asynchronous
);
NTSTATUS
STDCALL
ZwInitiatePowerAction (
- POWER_ACTION SystemAction,
- SYSTEM_POWER_STATE MinSystemState,
- ULONG Flags,
- BOOLEAN Asynchronous
+ IN POWER_ACTION SystemAction,
+ IN SYSTEM_POWER_STATE MinSystemState,
+ IN ULONG Flags,
+ IN BOOLEAN Asynchronous
);
/*
* FUNCTION: Initializes the registry.
@@ -1722,25 +1722,25 @@
NTSTATUS
STDCALL
NtMakePermanentObject(
- IN HANDLE Object
+ IN HANDLE ObjectHandle
);
NTSTATUS
STDCALL
ZwMakePermanentObject(
- IN HANDLE Object
+ IN HANDLE ObjectHandle
);
NTSTATUS
STDCALL
NtMakeTemporaryObject(
- IN HANDLE Handle
+ IN HANDLE ObjectHandle
);
NTSTATUS
STDCALL
ZwMakeTemporaryObject(
- IN HANDLE Handle
+ IN HANDLE ObjectHandle
);
/*
* FUNCTION: Maps a view of a section into the virtual address space of a
@@ -2228,14 +2228,14 @@
NTSTATUS
STDCALL
NtOpenSymbolicLinkObject(
- OUT PHANDLE SymbolicLinkHandle,
+ OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSTATUS
STDCALL
ZwOpenSymbolicLinkObject(
- OUT PHANDLE SymbolicLinkHandle,
+ OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
@@ -2342,21 +2342,21 @@
NTSTATUS
STDCALL
NtPowerInformation(
- POWER_INFORMATION_LEVEL PowerInformationLevel,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength
+ IN POWER_INFORMATION_LEVEL PowerInformationLevel,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
);
NTSTATUS
STDCALL
ZwPowerInformation(
- POWER_INFORMATION_LEVEL PowerInformationLevel,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength
+ IN POWER_INFORMATION_LEVEL PowerInformationLevel,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
);
NTSTATUS
@@ -2834,17 +2834,17 @@
IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
IN ULONG ThreadInformationLength,
- OUT PULONG ReturnLength
+ OUT PULONG ReturnLength OPTIONAL
);
NTSTATUS
STDCALL
ZwQueryInformationThread(
IN HANDLE ThreadHandle,
- IN THREADINFOCLASS ThreadInformationClass,
+ IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
- IN ULONG ThreadInformationLength,
- OUT PULONG ReturnLength
+ IN ULONG ThreadInformationLength,
+ OUT PULONG ReturnLength OPTIONAL
);
@@ -3081,17 +3081,17 @@
NTSTATUS
STDCALL
NtQuerySymbolicLinkObject(
- IN HANDLE SymLinkObjHandle,
+ IN HANDLE LinkHandle,
OUT PUNICODE_STRING LinkTarget,
- OUT PULONG DataWritten OPTIONAL
+ OUT PULONG ResultLength OPTIONAL
);
NTSTATUS
STDCALL
ZwQuerySymbolicLinkObject(
- IN HANDLE SymLinkObjHandle,
- OUT PUNICODE_STRING LinkName,
- OUT PULONG DataWritten OPTIONAL
+ IN HANDLE LinkHandle,
+ OUT PUNICODE_STRING LinkTarget,
+ OUT PULONG ResultLength OPTIONAL
);
@@ -3500,12 +3500,12 @@
NTSTATUS
STDCALL
NtRegisterThreadTerminatePort(
- HANDLE TerminationPort
+ HANDLE PortHandle
);
NTSTATUS
STDCALL
ZwRegisterThreadTerminatePort(
- HANDLE TerminationPort
+ HANDLE PortHandle
);
/*
@@ -3706,13 +3706,13 @@
STDCALL
NtResumeThread(
IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount
+ OUT PULONG SuspendCount OPTIONAL
);
NTSTATUS
STDCALL
ZwResumeThread(
IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount
+ OUT PULONG SuspendCount OPTIONAL
);
/*
* FUNCTION: Writes the content of a registry key to ascii file
@@ -3786,7 +3786,7 @@
* FUNCTION: Sets the context of a specified thread.
* ARGUMENTS:
* ThreadHandle = Handle to the thread
- * Context = The processor context.
+ * ThreadContext = The processor context.
* RETURNS: Status
*/
@@ -3794,13 +3794,13 @@
STDCALL
NtSetContextThread(
IN HANDLE ThreadHandle,
- IN PCONTEXT Context
+ IN PCONTEXT ThreadContext
);
NTSTATUS
STDCALL
ZwSetContextThread(
IN HANDLE ThreadHandle,
- IN PCONTEXT Context
+ IN PCONTEXT ThreadContext
);
/*
@@ -4501,13 +4501,13 @@
NTSTATUS
STDCALL
NtTerminateProcess(
- IN HANDLE ProcessHandle,
+ IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus
);
NTSTATUS
STDCALL
ZwTerminateProcess(
- IN HANDLE ProcessHandle,
+ IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus
);
@@ -4870,14 +4870,14 @@
STDCALL
NtSuspendThread(
IN HANDLE ThreadHandle,
- IN PULONG PreviousSuspendCount
+ OUT PULONG PreviousSuspendCount OPTIONAL
);
NTSTATUS
STDCALL
ZwSuspendThread(
IN HANDLE ThreadHandle,
- IN PULONG PreviousSuspendCount
+ OUT PULONG PreviousSuspendCount OPTIONAL
);
/*
@@ -5226,7 +5226,7 @@
IN HANDLE ProcessHandle,
OUT PCLIENT_ID ClientId,
IN PCONTEXT ThreadContext,
- IN PUSER_STACK UserStack,
+ IN PINITIAL_TEB InitialTeb,
IN BOOLEAN CreateSuspended
);
@@ -5827,7 +5827,7 @@
IN HANDLE ProcessHandle,
OUT PCLIENT_ID ClientId,
IN PCONTEXT ThreadContext,
- IN PUSER_STACK UserStack,
+ IN PINITIAL_TEB InitialTeb,
IN BOOLEAN CreateSuspended
);
@@ -6098,20 +6098,20 @@
STDCALL
NtQueryInformationProcess(
IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
OUT PVOID ProcessInformation,
IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength
+ OUT PULONG ReturnLength OPTIONAL
);
NTSTATUS
STDCALL
ZwQueryInformationProcess(
IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
OUT PVOID ProcessInformation,
IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength
+ OUT PULONG ReturnLength OPTIONAL
);
/*
@@ -6152,7 +6152,7 @@
IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
- OUT PULONG ResultLength OPTIONAL
+ OUT PULONG ResultLength OPTIONAL
);
NTSTATUS
@@ -6295,7 +6295,7 @@
STDCALL
NtSetInformationProcess(
IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
IN PVOID ProcessInformation,
IN ULONG ProcessInformationLength
);
@@ -6304,7 +6304,7 @@
STDCALL
ZwSetInformationProcess(
IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
IN PVOID ProcessInformation,
IN ULONG ProcessInformationLength
);
@@ -6553,7 +6553,7 @@
IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
- OUT PULONG ResultLength OPTIONAL
+ OUT PULONG ResultLength OPTIONAL
);
/* BEGIN REACTOS ONLY */
reactos/include/rosrtl
diff -u -r1.4 -r1.5
--- thread.h 30 Dec 2003 05:10:31 -0000 1.4
+++ thread.h 24 Oct 2004 20:37:26 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: thread.h,v 1.4 2003/12/30 05:10:31 hyperion Exp $
+/* $Id: thread.h,v 1.5 2004/10/24 20:37:26 weiden Exp $
*/
#ifdef __cplusplus
@@ -44,17 +44,17 @@
NTSTATUS NTAPI RtlRosInitializeContext
(
IN HANDLE ProcessHandle,
- OUT PCONTEXT Context,
- IN PVOID StartAddress,
- IN PUSER_STACK UserStack,
+ OUT PCONTEXT ThreadContext,
+ IN PVOID ThreadStartAddress,
+ IN PINITIAL_TEB InitialTeb,
IN ULONG ParameterCount,
- IN ULONG_PTR * Parameters
+ IN ULONG_PTR *Parameters
);
NTSTATUS NTAPI RtlRosCreateStack
(
IN HANDLE ProcessHandle,
- OUT PUSER_STACK UserStack,
+ OUT PINITIAL_TEB InitialTeb,
IN LONG StackZeroBits,
IN OUT PULONG StackReserve OPTIONAL,
IN OUT PULONG StackCommit OPTIONAL
@@ -63,7 +63,7 @@
NTSTATUS NTAPI RtlRosDeleteStack
(
IN HANDLE ProcessHandle,
- IN PUSER_STACK UserStack
+ IN PINITIAL_TEB InitialTeb
);
NTSTATUS NTAPI RtlRosFreeUserThreadStack
@@ -83,7 +83,7 @@
/* Private functions - for ROSRTL internal use only */
NTSTATUS NTAPI RtlpRosGetStackLimits
(
- IN PUSER_STACK UserStack,
+ IN PINITIAL_TEB InitialTeb,
OUT PVOID * StackBase,
OUT PVOID * StackLimit
);
reactos/lib/kernel32/thread
diff -u -r1.11 -r1.12
--- fiber.c 13 Jun 2004 20:04:56 -0000 1.11
+++ fiber.c 24 Oct 2004 20:37:26 -0000 1.12
@@ -1,4 +1,4 @@
-/* $Id: fiber.c,v 1.11 2004/06/13 20:04:56 navaraf Exp $
+/* $Id: fiber.c,v 1.12 2004/10/24 20:37:26 weiden Exp $
*
* FILE: lib/kernel32/thread/fiber.c
*
@@ -146,7 +146,7 @@
NTSTATUS nErrCode;
PSIZE_T pnStackReserve = NULL;
PSIZE_T pnStackCommit = NULL;
- USER_STACK usFiberStack;
+ INITIAL_TEB usFiberInitialTeb;
CONTEXT ctxFiberContext;
PTEB pTeb = NtCurrentTeb();
@@ -168,7 +168,7 @@
nErrCode = RtlRosCreateStack
(
NtCurrentProcess(),
- &usFiberStack,
+ &usFiberInitialTeb,
0,
pnStackReserve,
pnStackCommit
@@ -183,7 +183,7 @@
NtCurrentProcess(),
&ctxFiberContext,
FiberStartup,
- &usFiberStack,
+ &usFiberInitialTeb,
1,
(ULONG_PTR *)&lpStartAddress
);
@@ -194,23 +194,23 @@
/* copy the data into the fiber */
/* fixed-size stack */
- if(usFiberStack.FixedStackBase && usFiberStack.FixedStackLimit)
+ if(usFiberInitialTeb.StackBase && usFiberInitialTeb.StackLimit)
{
- pfCurFiber->StackBase = usFiberStack.FixedStackBase;
- pfCurFiber->StackLimit = usFiberStack.FixedStackLimit;
- pfCurFiber->DeallocationStack = usFiberStack.FixedStackLimit;
+ pfCurFiber->StackBase = usFiberInitialTeb.StackBase;
+ pfCurFiber->StackLimit = usFiberInitialTeb.StackLimit;
+ pfCurFiber->DeallocationStack = usFiberInitialTeb.StackLimit;
}
/* expandable stack */
else if
(
- usFiberStack.ExpandableStackBase &&
- usFiberStack.ExpandableStackLimit &&
- usFiberStack.ExpandableStackBottom
+ usFiberInitialTeb.StackCommit &&
+ usFiberInitialTeb.StackCommitMax &&
+ usFiberInitialTeb.StackReserved
)
{
- pfCurFiber->StackBase = usFiberStack.ExpandableStackBase;
- pfCurFiber->StackLimit = usFiberStack.ExpandableStackLimit;
- pfCurFiber->DeallocationStack = usFiberStack.ExpandableStackBottom;
+ pfCurFiber->StackBase = usFiberInitialTeb.StackCommit;
+ pfCurFiber->StackLimit = usFiberInitialTeb.StackCommitMax;
+ pfCurFiber->DeallocationStack = usFiberInitialTeb.StackReserved;
}
/* bad initial stack */
else goto l_CleanupStack;
@@ -239,7 +239,7 @@
l_CleanupStack:
/* free the stack */
- RtlRosDeleteStack(NtCurrentProcess(), &usFiberStack);
+ RtlRosDeleteStack(NtCurrentProcess(), &usFiberInitialTeb);
l_CleanupFiber:
/* free the fiber */
reactos/lib/ntdll/rtl
diff -u -r1.27 -r1.28
--- thread.c 30 Dec 2003 05:10:32 -0000 1.27
+++ thread.c 24 Oct 2004 20:37:26 -0000 1.28
@@ -73,23 +73,22 @@
/*
@implemented
*/
-NTSTATUS STDCALL RtlInitializeContext
-(
- HANDLE ProcessHandle,
- PCONTEXT Context,
- PVOID Parameter,
- PTHREAD_START_ROUTINE StartAddress,
- PUSER_STACK UserStack
-)
+NTSTATUS STDCALL
+RtlInitializeContext(
+ IN HANDLE ProcessHandle,
+ OUT PCONTEXT ThreadContext,
+ IN PVOID ThreadStartParam OPTIONAL,
+ IN PTHREAD_START_ROUTINE ThreadStartAddress,
+ IN PINITIAL_TEB InitialTeb)
{
return RtlRosInitializeContext
(
ProcessHandle,
- Context,
- StartAddress,
- UserStack,
+ ThreadContext,
+ ThreadStartAddress,
+ InitialTeb,
1,
- (ULONG_PTR *)&Parameter
+ (ULONG_PTR *)&ThreadStartParam
);
}
reactos/lib/rosrtl/thread
diff -u -r1.6 -r1.7
--- create.c 2 Mar 2004 17:16:04 -0000 1.6
+++ create.c 24 Oct 2004 20:37:26 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.6 2004/03/02 17:16:04 navaraf Exp $
+/* $Id: create.c,v 1.7 2004/10/24 20:37:26 weiden Exp $
*/
/*
*/
@@ -28,7 +28,7 @@
IN ULONG_PTR * Parameters
)
{
- USER_STACK usUserStack;
+ INITIAL_TEB usUserInitialTeb;
CONTEXT ctxInitialContext;
NTSTATUS nErrCode;
HANDLE hThread;
@@ -41,7 +41,7 @@
nErrCode = RtlRosCreateStack
(
ProcessHandle,
- &usUserStack,
+ &usUserInitialTeb,
StackZeroBits,
StackReserve,
StackCommit
@@ -56,7 +56,7 @@
ProcessHandle,
&ctxInitialContext,
StartAddress,
- &usUserStack,
+ &usUserInitialTeb,
ParameterCount,
Parameters
);
@@ -73,7 +73,7 @@
ProcessHandle,
ClientId,
&ctxInitialContext,
- &usUserStack,
+ &usUserInitialTeb,
CreateSuspended
);
@@ -88,7 +88,7 @@
ASSERT(!NT_SUCCESS(nErrCode));
/* deallocate the stack */
- RtlRosDeleteStack(ProcessHandle, &usUserStack);
+ RtlRosDeleteStack(ProcessHandle, &usUserInitialTeb);
return nErrCode;
}
reactos/lib/rosrtl/thread
diff -u -r1.6 -r1.7
--- stack.c 2 Mar 2004 17:16:04 -0000 1.6
+++ stack.c 24 Oct 2004 20:37:26 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Id: stack.c,v 1.6 2004/03/02 17:16:04 navaraf Exp $
+/* $Id: stack.c,v 1.7 2004/10/24 20:37:26 weiden Exp $
*/
/*
*/
@@ -14,7 +14,7 @@
NTSTATUS NTAPI RtlRosCreateStack
(
IN HANDLE ProcessHandle,
- OUT PUSER_STACK UserStack,
+ OUT PINITIAL_TEB InitialTeb,
IN LONG StackZeroBits,
IN OUT PULONG StackReserve OPTIONAL,
IN OUT PULONG StackCommit OPTIONAL
@@ -44,17 +44,17 @@
/* fixed stack */
if(*StackCommit == *StackReserve)
{
- UserStack->ExpandableStackBase = NULL;
- UserStack->ExpandableStackLimit = NULL;
- UserStack->ExpandableStackBottom = NULL;
+ InitialTeb->StackCommit = NULL;
+ InitialTeb->StackCommitMax = NULL;
+ InitialTeb->StackReserved = NULL;
- UserStack->FixedStackLimit = NULL;
+ InitialTeb->StackLimit = NULL;
/* allocate the stack */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->FixedStackLimit),
+ &(InitialTeb->StackLimit),
StackZeroBits,
StackReserve,
MEM_RESERVE | MEM_COMMIT,
@@ -65,8 +65,8 @@
if(!NT_SUCCESS(nErrCode)) goto l_Fail;
/* store the highest (first) address of the stack */
- UserStack->FixedStackBase =
- (PUCHAR)(UserStack->FixedStackLimit) + *StackReserve;
+ InitialTeb->StackBase =
+ (PUCHAR)(InitialTeb->StackLimit) + *StackReserve;
*StackCommit = *StackReserve;
}
@@ -78,16 +78,16 @@
DPRINT("Expandable stack\n");
- UserStack->FixedStackBase = NULL;
- UserStack->FixedStackLimit = NULL;
+ InitialTeb->StackBase = NULL;
+ InitialTeb->StackLimit = NULL;
- UserStack->ExpandableStackBottom = NULL;
+ InitialTeb->StackReserved = NULL;
/* reserve the stack */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->ExpandableStackBottom),
+ &(InitialTeb->StackReserved),
StackZeroBits,
StackReserve,
MEM_RESERVE,
@@ -100,22 +100,22 @@
DPRINT("Reserved %08X bytes\n", *StackReserve);
/* expandable stack base - the highest address of the stack */
- UserStack->ExpandableStackBase =
- (PUCHAR)(UserStack->ExpandableStackBottom) + *StackReserve;
+ InitialTeb->StackCommit =
+ (PUCHAR)(InitialTeb->StackReserved) + *StackReserve;
/* expandable stack limit - the lowest committed address of the stack */
- UserStack->ExpandableStackLimit =
- (PUCHAR)(UserStack->ExpandableStackBase) - *StackCommit;
+ InitialTeb->StackCommitMax =
+ (PUCHAR)(InitialTeb->StackCommit) - *StackCommit;
- DPRINT("Stack base %p\n", UserStack->ExpandableStackBase);
- DPRINT("Stack limit %p\n", UserStack->ExpandableStackLimit);
- DPRINT("Stack bottom %p\n", UserStack->ExpandableStackBottom);
+ DPRINT("Stack commit %p\n", InitialTeb->StackCommit);
+ DPRINT("Stack commit max %p\n", InitialTeb->StackCommitMax);
+ DPRINT("Stack reserved %p\n", InitialTeb->StackReserved);
/* commit as much stack as requested */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->ExpandableStackLimit),
+ &(InitialTeb->StackCommitMax),
0,
StackCommit,
MEM_COMMIT,
@@ -128,9 +128,9 @@
ASSERT((*StackReserve - *StackCommit) >= PAGE_SIZE);
ASSERT((*StackReserve - *StackCommit) % PAGE_SIZE == 0);
- pGuardBase = (PUCHAR)(UserStack->ExpandableStackLimit) - PAGE_SIZE;
+ pGuardBase = (PUCHAR)(InitialTeb->StackCommitMax) - PAGE_SIZE;
- DPRINT("Guard base %p\n", UserStack->ExpandableStackBase);
+ DPRINT("Guard base %p\n", InitialTeb->StackCommit);
/* set up the guard page */
nErrCode = NtAllocateVirtualMemory
@@ -146,7 +146,7 @@
/* failure */
if(!NT_SUCCESS(nErrCode)) goto l_Cleanup;
- DPRINT("Guard base %p\n", UserStack->ExpandableStackBase);
+ DPRINT("Guard base %p\n", InitialTeb->StackCommit);
}
@@ -155,7 +155,7 @@
/* deallocate the stack */
l_Cleanup:
- RtlRosDeleteStack(ProcessHandle, UserStack);
+ RtlRosDeleteStack(ProcessHandle, InitialTeb);
/* failure */
l_Fail:
@@ -166,16 +166,16 @@
NTSTATUS NTAPI RtlRosDeleteStack
(
IN HANDLE ProcessHandle,
- IN PUSER_STACK UserStack
+ IN PINITIAL_TEB InitialTeb
)
{
PVOID pStackLowest = NULL;
ULONG_PTR nSize;
- if(UserStack->FixedStackLimit)
- pStackLowest = UserStack->FixedStackLimit;
- else if(UserStack->ExpandableStackBottom)
- pStackLowest = UserStack->ExpandableStackBottom;
+ if(InitialTeb->StackLimit)
+ pStackLowest = InitialTeb->StackLimit;
+ else if(InitialTeb->StackReserved)
+ pStackLowest = InitialTeb->StackReserved;
/* free the stack, if it was allocated */
if(pStackLowest != NULL)
@@ -238,22 +238,22 @@
NTSTATUS NTAPI RtlpRosGetStackLimits
(
- IN PUSER_STACK UserStack,
+ IN PINITIAL_TEB InitialTeb,
OUT PVOID * StackBase,
OUT PVOID * StackLimit
)
{
/* fixed-size stack */
- if(UserStack->FixedStackBase && UserStack->FixedStackLimit)
+ if(InitialTeb->StackBase && InitialTeb->StackLimit)
{
- *StackBase = UserStack->FixedStackBase;
- *StackLimit = UserStack->FixedStackLimit;
+ *StackBase = InitialTeb->StackBase;
+ *StackLimit = InitialTeb->StackLimit;
}
/* expandable stack */
- else if(UserStack->ExpandableStackBase && UserStack->ExpandableStackLimit)
+ else if(InitialTeb->StackCommit && InitialTeb->StackCommitMax)
{
- *StackBase = UserStack->ExpandableStackBase;
- *StackLimit = UserStack->ExpandableStackLimit;
+ *StackBase = InitialTeb->StackCommit;
+ *StackLimit = InitialTeb->StackCommitMax;
}
/* can't determine the type of stack: failure */
else
reactos/lib/rosrtl/thread/i386
diff -u -r1.2 -r1.3
--- context.c 7 Aug 2003 03:35:06 -0000 1.2
+++ context.c 24 Oct 2004 20:37:26 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.2 2003/08/07 03:35:06 royce Exp $
+/* $Id: context.c,v 1.3 2004/10/24 20:37:26 weiden Exp $
*/
/*
*/
@@ -19,7 +19,7 @@
IN HANDLE ProcessHandle,
OUT PCONTEXT Context,
IN PVOID StartAddress,
- IN PUSER_STACK UserStack,
+ IN PINITIAL_TEB InitialTeb,
IN ULONG ParameterCount,
IN ULONG_PTR * Parameters
)
@@ -34,7 +34,7 @@
/* Intel x86: linear top-down stack, all parameters passed on the stack */
/* get the stack base and limit */
- nErrCode = RtlpRosGetStackLimits(UserStack, &pStackBase, &pStackLimit);
+ nErrCode = RtlpRosGetStackLimits(InitialTeb, &pStackBase, &pStackLimit);
/* failure */
if(!NT_SUCCESS(nErrCode)) return nErrCode;
reactos/ntoskrnl/ldr
diff -u -r1.47 -r1.48
--- init.c 25 Sep 2004 06:41:16 -0000 1.47
+++ init.c 24 Oct 2004 20:37:26 -0000 1.48
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: init.c,v 1.47 2004/09/25 06:41:16 arty Exp $
+/* $Id: init.c,v 1.48 2004/10/24 20:37:26 weiden Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ldr/init.c
@@ -230,7 +230,7 @@
static NTSTATUS LdrpCreateStack
(
HANDLE ProcessHandle,
- PUSER_STACK UserStack,
+ PINITIAL_TEB InitialTeb,
PULONG_PTR StackReserve,
PULONG_PTR StackCommit
)
@@ -245,11 +245,11 @@
/* FIXME: no SEH, no guard pages */
*StackCommit = *StackReserve;
- UserStack->FixedStackBase = NULL;
- UserStack->FixedStackLimit = NULL;
- UserStack->ExpandableStackBase = NULL;
- UserStack->ExpandableStackLimit = NULL;
- UserStack->ExpandableStackBottom = NULL;
+ InitialTeb->StackBase = NULL;
+ InitialTeb->StackLimit = NULL;
+ InitialTeb->StackCommit = NULL;
+ InitialTeb->StackCommitMax = NULL;
+ InitialTeb->StackReserved = NULL;
/* FIXME: this code assumes a stack growing downwards */
/* fixed stack */
@@ -257,13 +257,13 @@
{
DPRINT("Fixed stack\n");
- UserStack->FixedStackLimit = NULL;
+ InitialTeb->StackLimit = NULL;
/* allocate the stack */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->FixedStackLimit),
+ &(InitialTeb->StackLimit),
0,
StackReserve,
MEM_RESERVE | MEM_COMMIT,
@@ -274,8 +274,8 @@
if(!NT_SUCCESS(nErrCode)) return nErrCode;
/* store the highest (first) address of the stack */
- UserStack->FixedStackBase =
- (PUCHAR)(UserStack->FixedStackLimit) + *StackReserve;
+ InitialTeb->StackBase =
+ (PUCHAR)(InitialTeb->StackLimit) + *StackReserve;
}
/* expandable stack */
else
@@ -285,15 +285,15 @@
DPRINT("Expandable stack\n");
- UserStack->FixedStackLimit = NULL;
- UserStack->FixedStackBase = NULL;
- UserStack->ExpandableStackBottom = NULL;
+ InitialTeb->StackLimit = NULL;
+ InitialTeb->StackBase = NULL;
+ InitialTeb->StackReserved = NULL;
/* reserve the stack */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->ExpandableStackBottom),
+ &(InitialTeb->StackReserved),
0,
StackReserve,
MEM_RESERVE,
@@ -306,21 +306,21 @@
DPRINT("Reserved %08X bytes\n", *StackReserve);
/* expandable stack base - the highest address of the stack */
- UserStack->ExpandableStackBase =
- (PUCHAR)(UserStack->ExpandableStackBottom) + *StackReserve;
+ InitialTeb->StackCommit =
+ (PUCHAR)(InitialTeb->StackReserved) + *StackReserve;
/* expandable stack limit - the lowest committed address of the stack */
- UserStack->ExpandableStackLimit =
- (PUCHAR)(UserStack->ExpandableStackBase) - *StackCommit;
+ InitialTeb->StackCommitMax =
+ (PUCHAR)(InitialTeb->StackCommit) - *StackCommit;
- DPRINT("Stack base %p\n", UserStack->ExpandableStackBase);
- DPRINT("Stack limit %p\n", UserStack->ExpandableStackLimit);
+ DPRINT("Stack commit %p\n", InitialTeb->StackCommit);
+ DPRINT("Stack commit max %p\n", InitialTeb->StackCommitMax);
/* commit as much stack as requested */
nErrCode = NtAllocateVirtualMemory
(
ProcessHandle,
- &(UserStack->ExpandableStackLimit),
+ &(InitialTeb->StackCommitMax),
0,
StackCommit,
MEM_COMMIT,
@@ -330,11 +330,11 @@
/* failure */
if(!NT_SUCCESS(nErrCode)) goto l_Cleanup;
- DPRINT("Stack limit %p\n", UserStack->ExpandableStackLimit);
+ DPRINT("Stack commit max %p\n", InitialTeb->StackCommitMax);
- pGuardBase = (PUCHAR)(UserStack->ExpandableStackLimit) - PAGE_SIZE;
+ pGuardBase = (PUCHAR)(InitialTeb->StackCommitMax) - PAGE_SIZE;
- DPRINT("Guard base %p\n", UserStack->ExpandableStackBase);
+ DPRINT("Guard base %p\n", InitialTeb->StackCommit);
/* set up the guard page */
nErrCode = NtAllocateVirtualMemory
@@ -350,17 +350,17 @@
/* failure */
if(!NT_SUCCESS(nErrCode)) goto l_Cleanup;
- DPRINT("Guard base %p\n", UserStack->ExpandableStackBase);
+ DPRINT("Guard base %p\n", InitialTeb->StackCommit);
}
return STATUS_SUCCESS;
/* cleanup in case of failure */
l_Cleanup:
- if(UserStack->FixedStackLimit)
- pStackLowest = UserStack->FixedStackLimit;
- else if(UserStack->ExpandableStackBottom)
- pStackLowest = UserStack->ExpandableStackBottom;
+ if(InitialTeb->StackLimit)
+ pStackLowest = InitialTeb->StackLimit;
+ else if(InitialTeb->StackReserved)
+ pStackLowest = InitialTeb->StackReserved;
/* free the stack, if it was allocated */
if(pStackLowest != NULL)
@@ -378,7 +378,7 @@
UNICODE_STRING ImagePath;
HANDLE SectionHandle;
CONTEXT Context;
- USER_STACK UserStack;
+ INITIAL_TEB InitialTeb;
ULONG_PTR nStackReserve = 0;
ULONG_PTR nStackCommit = 0;
PVOID pStackLowest;
@@ -468,7 +468,7 @@
Status = LdrpCreateStack
(
*ProcessHandle,
- &UserStack,
+ &InitialTeb,
&nStackReserve,
&nStackCommit
);
@@ -480,15 +480,15 @@
return(Status);
}
- if(UserStack.FixedStackBase && UserStack.FixedStackLimit)
+ if(InitialTeb.StackBase && InitialTeb.StackLimit)
{
- pStackBase = UserStack.FixedStackBase;
- pStackLowest = UserStack.FixedStackLimit;
+ pStackBase = InitialTeb.StackBase;
+ pStackLowest = InitialTeb.StackLimit;
}
else
{
- pStackBase = UserStack.ExpandableStackBase;
- pStackLowest = UserStack.ExpandableStackBottom;
+ pStackBase = InitialTeb.StackCommit;
+ pStackLowest = InitialTeb.StackReserved;
}
DPRINT("pStackBase = %p\n", pStackBase);
@@ -549,7 +549,7 @@
*ProcessHandle,
NULL,
&Context,
- &UserStack,
+ &InitialTeb,
FALSE);
if (!NT_SUCCESS(Status))
{
reactos/ntoskrnl/ob
diff -u -r1.23 -r1.24
--- ntobj.c 15 Aug 2004 16:39:10 -0000 1.23
+++ ntobj.c 24 Oct 2004 20:37:26 -0000 1.24
@@ -1,4 +1,4 @@
-/* $Id: ntobj.c,v 1.23 2004/08/15 16:39:10 chorns Exp $
+/* $Id: ntobj.c,v 1.24 2004/10/24 20:37:26 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -82,7 +82,7 @@
IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
- OUT PULONG ReturnLength OPTIONAL)
+ OUT PULONG ResultLength OPTIONAL)
{
OBJECT_HANDLE_INFORMATION HandleInfo;
POBJECT_HEADER ObjectHeader;
@@ -199,8 +199,8 @@
ObDereferenceObject (Object);
- if (ReturnLength != NULL)
- *ReturnLength = InfoLength;
+ if (ResultLength != NULL)
+ *ResultLength = InfoLength;
return Status;
}
@@ -243,13 +243,13 @@
* REVISIONS
*/
NTSTATUS STDCALL
-NtMakeTemporaryObject(IN HANDLE Handle)
+NtMakeTemporaryObject(IN HANDLE ObjectHandle)
{
POBJECT_HEADER ObjectHeader;
PVOID Object;
NTSTATUS Status;
- Status = ObReferenceObjectByHandle(Handle,
+ Status = ObReferenceObjectByHandle(ObjectHandle,
0,
NULL,
(KPROCESSOR_MODE)KeGetPreviousMode(),
@@ -284,13 +284,13 @@
* @implemented
*/
NTSTATUS STDCALL
-NtMakePermanentObject(IN HANDLE Handle)
+NtMakePermanentObject(IN HANDLE ObjectHandle)
{
POBJECT_HEADER ObjectHeader;
PVOID Object;
NTSTATUS Status;
- Status = ObReferenceObjectByHandle(Handle,
+ Status = ObReferenceObjectByHandle(ObjectHandle,
0,
NULL,
(KPROCESSOR_MODE)KeGetPreviousMode(),
reactos/ntoskrnl/ob
diff -u -r1.10 -r1.11
--- symlink.c 22 Oct 2004 20:43:58 -0000 1.10
+++ symlink.c 24 Oct 2004 20:37:26 -0000 1.11
@@ -1,4 +1,4 @@
-/* $Id: symlink.c,v 1.10 2004/10/22 20:43:58 ekohl Exp $
+/* $Id: symlink.c,v 1.11 2004/10/24 20:37:26 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -202,10 +202,10 @@
*
*/
NTSTATUS STDCALL
-NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,
+NtCreateSymbolicLinkObject(OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING DeviceName)
+ IN PUNICODE_STRING LinkTarget)
{
PSYMLINK_OBJECT SymbolicLink;
NTSTATUS Status;
@@ -237,7 +237,7 @@
DesiredAccess,
0,
NULL,
- SymbolicLinkHandle);
+ LinkHandle);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject (SymbolicLink);
@@ -246,13 +246,13 @@
SymbolicLink->TargetName.Length = 0;
SymbolicLink->TargetName.MaximumLength =
- ((wcslen(DeviceName->Buffer) + 1) * sizeof(WCHAR));
+ ((wcslen(LinkTarget->Buffer) + 1) * sizeof(WCHAR));
SymbolicLink->TargetName.Buffer =
ExAllocatePoolWithTag(NonPagedPool,
SymbolicLink->TargetName.MaximumLength,
TAG_SYMLINK_TARGET);
RtlCopyUnicodeString(&SymbolicLink->TargetName,
- DeviceName);
+ LinkTarget);
DPRINT("DeviceName %S\n", SymbolicLink->TargetName.Buffer);
@@ -311,8 +311,8 @@
*/
NTSTATUS STDCALL
NtQuerySymbolicLinkObject(IN HANDLE LinkHandle,
- IN OUT PUNICODE_STRING LinkTarget,
- OUT PULONG ReturnedLength OPTIONAL)
+ OUT PUNICODE_STRING LinkTarget,
+ OUT PULONG ResultLength OPTIONAL)
{
PSYMLINK_OBJECT SymlinkObject;
NTSTATUS Status;
@@ -328,9 +328,9 @@
return Status;
}
- if (ReturnedLength != NULL)
+ if (ResultLength != NULL)
{
- *ReturnedLength = (ULONG)SymlinkObject->TargetName.Length + sizeof(WCHAR);
+ *ResultLength = (ULONG)SymlinkObject->TargetName.Length + sizeof(WCHAR);
}
if (LinkTarget->MaximumLength >= SymlinkObject->TargetName.Length + sizeof(WCHAR))
reactos/ntoskrnl/po
diff -u -r1.11 -r1.12
--- power.c 15 Aug 2004 16:39:10 -0000 1.11
+++ power.c 24 Oct 2004 20:37:26 -0000 1.12
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: power.c,v 1.11 2004/08/15 16:39:10 chorns Exp $
+/* $Id: power.c,v 1.12 2004/10/24 20:37:26 weiden Exp $
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/po/power.c
* PURPOSE: Power Manager
@@ -223,10 +223,10 @@
NTSTATUS
STDCALL
NtInitiatePowerAction (
- POWER_ACTION SystemAction,
- SYSTEM_POWER_STATE MinSystemState,
- ULONG Flags,
- BOOLEAN Asynchronous)
+ IN POWER_ACTION SystemAction,
+ IN SYSTEM_POWER_STATE MinSystemState,
+ IN ULONG Flags,
+ IN BOOLEAN Asynchronous)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
@@ -238,17 +238,15 @@
NTSTATUS
STDCALL
NtPowerInformation(
- POWER_INFORMATION_LEVEL PowerInformationLevel,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength
+ IN POWER_INFORMATION_LEVEL PowerInformationLevel,
+ IN PVOID InputBuffer OPTIONAL,
+ IN ULONG InputBufferLength,
+ OUT PVOID OutputBuffer OPTIONAL,
+ IN ULONG OutputBufferLength
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
-
-
/* EOF */
reactos/ntoskrnl/ps
diff -u -r1.83 -r1.84
--- create.c 22 Oct 2004 20:45:46 -0000 1.83
+++ create.c 24 Oct 2004 20:37:27 -0000 1.84
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.83 2004/10/22 20:45:46 ekohl Exp $
+/* $Id: create.c,v 1.84 2004/10/24 20:37:27 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -502,7 +502,7 @@
PsCreateTeb(HANDLE ProcessHandle,
PTEB *TebPtr,
PETHREAD Thread,
- PUSER_STACK UserStack)
+ PINITIAL_TEB InitialTeb)
{
PEPROCESS Process;
NTSTATUS Status;
@@ -584,22 +584,22 @@
}
DPRINT("Teb.Peb %x\n", Teb.Peb);
- /* store stack information from UserStack */
- if(UserStack != NULL)
+ /* store stack information from InitialTeb */
+ if(InitialTeb != NULL)
{
/* fixed-size stack */
- if(UserStack->FixedStackBase && UserStack->FixedStackLimit)
+ if(InitialTeb->StackBase && InitialTeb->StackLimit)
{
- Teb.Tib.StackBase = UserStack->FixedStackBase;
- Teb.Tib.StackLimit = UserStack->FixedStackLimit;
- Teb.DeallocationStack = UserStack->FixedStackLimit;
+ Teb.Tib.StackBase = InitialTeb->StackBase;
+ Teb.Tib.StackLimit = InitialTeb->StackLimit;
+ Teb.DeallocationStack = InitialTeb->StackLimit;
}
/* expandable stack */
else
{
- Teb.Tib.StackBase = UserStack->ExpandableStackBase;
- Teb.Tib.StackLimit = UserStack->ExpandableStackLimit;
- Teb.DeallocationStack = UserStack->ExpandableStackBottom;
+ Teb.Tib.StackBase = InitialTeb->StackCommit;
+ Teb.Tib.StackLimit = InitialTeb->StackCommitMax;
+ Teb.DeallocationStack = InitialTeb->StackReserved;
}
}
@@ -664,14 +664,14 @@
NTSTATUS STDCALL
-NtCreateThread(PHANDLE ThreadHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes,
- HANDLE ProcessHandle,
- PCLIENT_ID Client,
- PCONTEXT ThreadContext,
- PUSER_STACK UserStack,
- BOOLEAN CreateSuspended)
+NtCreateThread(OUT PHANDLE ThreadHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN HANDLE ProcessHandle,
+ OUT PCLIENT_ID Client,
+ IN PCONTEXT ThreadContext,
+ IN PINITIAL_TEB InitialTeb,
+ IN BOOLEAN CreateSuspended)
{
PEPROCESS Process;
PETHREAD Thread;
@@ -716,7 +716,7 @@
Status = PsCreateTeb(ProcessHandle,
&TebBase,
Thread,
- UserStack);
+ InitialTeb);
if (!NT_SUCCESS(Status))
{
return(Status);
reactos/ntoskrnl/ps
diff -u -r1.13 -r1.14
--- debug.c 15 Aug 2004 16:39:10 -0000 1.13
+++ debug.c 24 Oct 2004 20:37:27 -0000 1.14
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: debug.c,v 1.13 2004/08/15 16:39:10 chorns Exp $
+/* $Id: debug.c,v 1.14 2004/10/24 20:37:27 weiden Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ps/debug.c
@@ -185,7 +185,7 @@
NTSTATUS STDCALL
NtGetContextThread(IN HANDLE ThreadHandle,
- OUT PCONTEXT UnsafeContext)
+ OUT PCONTEXT ThreadContext)
{
PETHREAD Thread;
NTSTATUS Status;
@@ -194,7 +194,7 @@
KEVENT Event;
NTSTATUS AStatus;
- Status = MmCopyFromCaller(&Context, UnsafeContext, sizeof(CONTEXT));
+ Status = MmCopyFromCaller(&Context, ThreadContext, sizeof(CONTEXT));
if (! NT_SUCCESS(Status))
{
return Status;
@@ -256,7 +256,7 @@
}
if (NT_SUCCESS(Status))
{
- Status = MmCopyToCaller(UnsafeContext, &Context, sizeof(Context));
+ Status = MmCopyToCaller(ThreadContext, &Context, sizeof(Context));
}
ObDereferenceObject(Thread);
@@ -290,7 +290,7 @@
NTSTATUS STDCALL
NtSetContextThread(IN HANDLE ThreadHandle,
- IN PCONTEXT UnsafeContext)
+ IN PCONTEXT ThreadContext)
{
PETHREAD Thread;
NTSTATUS Status;
@@ -299,7 +299,7 @@
NTSTATUS AStatus;
CONTEXT Context;
- Status = MmCopyFromCaller(&Context, UnsafeContext, sizeof(CONTEXT));
+ Status = MmCopyFromCaller(&Context, ThreadContext, sizeof(CONTEXT));
if (! NT_SUCCESS(Status))
{
return Status;
reactos/ntoskrnl/ps
diff -u -r1.79 -r1.80
--- kill.c 3 Oct 2004 21:03:03 -0000 1.79
+++ kill.c 24 Oct 2004 20:37:27 -0000 1.80
@@ -1,4 +1,4 @@
-/* $Id: kill.c,v 1.79 2004/10/03 21:03:03 gvg Exp $
+/* $Id: kill.c,v 1.80 2004/10/24 20:37:27 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -305,7 +305,7 @@
}
NTSTATUS STDCALL
-NtTerminateProcess(IN HANDLE ProcessHandle,
+NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus)
{
NTSTATUS Status;
@@ -417,7 +417,7 @@
}
NTSTATUS STDCALL
-NtRegisterThreadTerminatePort(HANDLE TerminationPortHandle)
+NtRegisterThreadTerminatePort(HANDLE PortHandle)
{
NTSTATUS Status;
PEPORT_TERMINATION_REQUEST Request;
@@ -425,7 +425,7 @@
KIRQL oldIrql;
PETHREAD Thread;
- Status = ObReferenceObjectByHandle(TerminationPortHandle,
+ Status = ObReferenceObjectByHandle(PortHandle,
PORT_ALL_ACCESS,
ExPortType,
KeGetCurrentThread()->PreviousMode,
reactos/ntoskrnl/ps
diff -u -r1.11 -r1.12
--- locale.c 16 Sep 2004 11:45:06 -0000 1.11
+++ locale.c 24 Oct 2004 20:37:27 -0000 1.12
@@ -1,4 +1,4 @@
-/* $Id: locale.c,v 1.11 2004/09/16 11:45:06 ekohl Exp $
+/* $Id: locale.c,v 1.12 2004/10/24 20:37:27 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -198,22 +198,22 @@
* FUNCTION:
* Returns the default locale.
* ARGUMENTS:
- * ThreadOrSystem = If TRUE then the locale for this thread is returned,
- * otherwise the locale for the system is returned.
+ * UserProfile = If TRUE then the locale for this thread is returned,
+ * otherwise the locale for the system is returned.
* DefaultLocaleId = Points to a variable that receives the locale id.
* Returns:
* Status.
*/
NTSTATUS STDCALL
-NtQueryDefaultLocale(IN BOOLEAN ThreadOrSystem,
+NtQueryDefaultLocale(IN BOOLEAN UserProfile,
OUT PLCID DefaultLocaleId)
{
if (DefaultLocaleId == NULL)
return STATUS_UNSUCCESSFUL;
- if (ThreadOrSystem == TRUE)
+ if (UserProfile)
{
- if (PsDefaultThreadLocaleInitialized == FALSE)
+ if (!PsDefaultThreadLocaleInitialized)
{
PiInitThreadLocale();
}
@@ -242,7 +242,7 @@
* Status.
*/
NTSTATUS STDCALL
-NtSetDefaultLocale(IN BOOLEAN ThreadOrSystem,
+NtSetDefaultLocale(IN BOOLEAN UserProfile,
IN LCID DefaultLocaleId)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -254,7 +254,7 @@
HANDLE UserKey = NULL;
NTSTATUS Status;
- if (ThreadOrSystem == TRUE)
+ if (UserProfile)
{
/* thread locale */
Status = RtlOpenCurrentUser(KEY_WRITE,
@@ -315,7 +315,7 @@
return(Status);
}
- if (ThreadOrSystem == TRUE)
+ if (UserProfile)
{
/* set thread locale */
DPRINT("Thread locale: %08lu\n", DefaultLocaleId);
reactos/ntoskrnl/ps
diff -u -r1.145 -r1.146
--- process.c 22 Oct 2004 20:45:46 -0000 1.145
+++ process.c 24 Oct 2004 20:37:27 -0000 1.146
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.145 2004/10/22 20:45:46 ekohl Exp $
+/* $Id: process.c,v 1.146 2004/10/24 20:37:27 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -114,14 +114,18 @@
}
+/*
+ * @implemented
+ */
NTSTATUS STDCALL
-_NtOpenProcessToken(IN HANDLE ProcessHandle,
+NtOpenProcessToken(IN HANDLE ProcessHandle,
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE TokenHandle)
{
PACCESS_TOKEN Token;
+ HANDLE hToken;
NTSTATUS Status;
-
+
Status = PsOpenTokenOfProcess(ProcessHandle,
&Token);
if (!NT_SUCCESS(Status))
@@ -132,24 +136,18 @@
Token,
DesiredAccess,
FALSE,
- TokenHandle);
+ &hToken);
ObDereferenceObject(Token);
+
+ if(NT_SUCCESS(Status))
+ {
+ Status = MmCopyToCaller(TokenHandle, &hToken, sizeof(HANDLE));
+ }
return(Status);
}
/*
- * @implemented
- */
-NTSTATUS STDCALL
-NtOpenProcessToken(IN HANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE TokenHandle)
-{
- return _NtOpenProcessToken(ProcessHandle, DesiredAccess, TokenHandle);
-}
-
-/*
* @unimplemented
*/
NTSTATUS
@@ -166,7 +164,6 @@
}
-
/*
* @implemented
*/
@@ -577,12 +574,12 @@
NTSTATUS STDCALL
NtCreateProcess(OUT PHANDLE ProcessHandle,
IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN HANDLE ParentProcessHandle,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN HANDLE ParentProcess,
IN BOOLEAN InheritObjectTable,
- IN HANDLE SectionHandle OPTIONAL,
- IN HANDLE DebugPortHandle OPTIONAL,
- IN HANDLE ExceptionPortHandle OPTIONAL)
+ IN HANDLE SectionHandle OPTIONAL,
+ IN HANDLE DebugPort OPTIONAL,
+ IN HANDLE ExceptionPort OPTIONAL)
/*
* FUNCTION: Creates a process.
* ARGUMENTS:
@@ -606,14 +603,14 @@
*/
{
PEPROCESS Process;
- PEPROCESS ParentProcess;
+ PEPROCESS pParentProcess;
PKPROCESS KProcess;
NTSTATUS Status;
KIRQL oldIrql;
PVOID LdrStartupAddr;
PVOID ImageBase;
- PEPORT DebugPort;
- PEPORT ExceptionPort;
+ PEPORT pDebugPort;
+ PEPORT pExceptionPort;
PVOID BaseAddress;
PMEMORY_AREA MemoryArea;
PHYSICAL_ADDRESS BoundaryAddressMultiple;
@@ -622,11 +619,11 @@
BoundaryAddressMultiple.QuadPart = 0;
- Status = ObReferenceObjectByHandle(ParentProcessHandle,
+ Status = ObReferenceObjectByHandle(ParentProcess,
PROCESS_CREATE_PROCESS,
PsProcessType,
ExGetPreviousMode(),
- (PVOID*)&ParentProcess,
+ (PVOID*)&pParentProcess,
NULL);
if (!NT_SUCCESS(Status))
{
@@ -645,7 +642,7 @@
(PVOID*)&Process);
if (!NT_SUCCESS(Status))
{
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
DPRINT("ObCreateObject() = %x\n",Status);
return(Status);
}
@@ -659,7 +656,7 @@
if (!NT_SUCCESS(Status))
{
ObDereferenceObject (Process);
- ObDereferenceObject (ParentProcess);
+ ObDereferenceObject (pParentProcess);
DPRINT("ObInsertObject() = %x\n",Status);
return Status;
}
@@ -670,7 +667,7 @@
FALSE);
KProcess = &Process->Pcb;
/* Inherit parent process's affinity. */
- KProcess->Affinity = ParentProcess->Pcb.Affinity;
+ KProcess->Affinity = pParentProcess->Pcb.Affinity;
KProcess->BasePriority = PROCESS_PRIO_NORMAL;
KProcess->IopmOffset = 0xffff;
KProcess->LdtDescriptor[0] = 0;
@@ -680,18 +677,18 @@
&Process->AddressSpace);
Process->UniqueProcessId = InterlockedIncrement((LONG *)&PiNextProcessUniqueId); /* TODO */
Process->InheritedFromUniqueProcessId =
- (HANDLE)ParentProcess->UniqueProcessId;
- ObCreateHandleTable(ParentProcess,
+ (HANDLE)pParentProcess->UniqueProcessId;
+ ObCreateHandleTable(pParentProcess,
InheritObjectTable,
Process);
- MmCopyMmInfo(ParentProcess, Process);
- if (ParentProcess->Win32WindowStation != (HANDLE)0)
+ MmCopyMmInfo(pParentProcess, Process);
+ if (pParentProcess->Win32WindowStation != (HANDLE)0)
{
/* Always duplicate the process window station. */
Process->Win32WindowStation = 0;
- Status = ObDuplicateObject(ParentProcess,
+ Status = ObDuplicateObject(pParentProcess,
Process,
- ParentProcess->Win32WindowStation,
+ pParentProcess->Win32WindowStation,
&Process->Win32WindowStation,
0,
FALSE,
@@ -705,13 +702,13 @@
{
Process->Win32WindowStation = (HANDLE)0;
}
- if (ParentProcess->Win32Desktop != (HANDLE)0)
+ if (pParentProcess->Win32Desktop != (HANDLE)0)
{
/* Always duplicate the process window station. */
Process->Win32Desktop = 0;
- Status = ObDuplicateObject(ParentProcess,
+ Status = ObDuplicateObject(pParentProcess,
Process,
- ParentProcess->Win32Desktop,
+ pParentProcess->Win32Desktop,
&Process->Win32Desktop,
0,
FALSE,
@@ -737,45 +734,45 @@
/*
* Add the debug port
*/
- if (DebugPortHandle != NULL)
+ if (DebugPort != NULL)
{
- Status = ObReferenceObjectByHandle(DebugPortHandle,
+ Status = ObReferenceObjectByHandle(DebugPort,
PORT_ALL_ACCESS,
ExPortType,
UserMode,
- (PVOID*)&DebugPort,
+ (PVOID*)&pDebugPort,
NULL);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
ZwClose(*ProcessHandle);
*ProcessHandle = NULL;
return(Status);
}
- Process->DebugPort = DebugPort;
+ Process->DebugPort = pDebugPort;
}
/*
* Add the exception port
*/
- if (ExceptionPortHandle != NULL)
+ if (ExceptionPort != NULL)
{
- Status = ObReferenceObjectByHandle(ExceptionPortHandle,
+ Status = ObReferenceObjectByHandle(ExceptionPort,
PORT_ALL_ACCESS,
ExPortType,
UserMode,
- (PVOID*)&ExceptionPort,
+ (PVOID*)&pExceptionPort,
NULL);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
ZwClose(*ProcessHandle);
*ProcessHandle = NULL;
return(Status);
}
- Process->ExceptionPort = ExceptionPort;
+ Process->ExceptionPort = pExceptionPort;
}
/*
@@ -871,7 +868,7 @@
{
DbgPrint("LdrpMapSystemDll failed (Status %x)\n", Status);
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
return(Status);
}
@@ -888,7 +885,7 @@
{
DbgPrint("LdrpMapImage failed (Status %x)\n", Status);
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
return(Status);
}
}
@@ -900,12 +897,12 @@
/*
* Duplicate the token
*/
- Status = SepInitializeNewProcess(Process, ParentProcess);
+ Status = SepInitializeNewProcess(Process, pParentProcess);
if (!NT_SUCCESS(Status))
{
DbgPrint("SepInitializeNewProcess failed (Status %x)\n", Status);
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
return(Status);
}
@@ -920,7 +917,7 @@
{
DbgPrint("NtCreateProcess() Peb creation failed: Status %x\n",Status);
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
ZwClose(*ProcessHandle);
*ProcessHandle = NULL;
return(Status);
@@ -930,7 +927,7 @@
* Maybe send a message to the creator process's debugger
*/
#if 0
- if (ParentProcess->DebugPort != NULL)
+ if (pParentProcess->DebugPort != NULL)
{
LPC_DBG_MESSAGE Message;
HANDLE FileHandle;
@@ -949,7 +946,7 @@
Message.Data.CreateProcess.Base = ImageBase;
Message.Data.CreateProcess.EntryPoint = NULL; //
- Status = LpcSendDebugMessagePort(ParentProcess->DebugPort,
+ Status = LpcSendDebugMessagePort(pParentProcess->DebugPort,
&Message);
}
#endif
@@ -957,7 +954,7 @@
PspRunCreateProcessNotifyRoutines(Process, TRUE);
ObDereferenceObject(Process);
- ObDereferenceObject(ParentProcess);
+ ObDereferenceObject(pParentProcess);
return(STATUS_SUCCESS);
}
@@ -1063,10 +1060,10 @@
*/
NTSTATUS STDCALL
NtQueryInformationProcess(IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
OUT PVOID ProcessInformation,
IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength OPTIONAL)
+ OUT PULONG ReturnLength OPTIONAL)
{
PEPROCESS Process;
NTSTATUS Status;
@@ -1311,7 +1308,7 @@
*/
NTSTATUS STDCALL
NtSetInformationProcess(IN HANDLE ProcessHandle,
- IN CINT ProcessInformationClass,
+ IN PROCESSINFOCLASS ProcessInformationClass,
IN PVOID ProcessInformation,
IN ULONG ProcessInformationLength)
{
reactos/ntoskrnl/ps
diff -u -r1.15 -r1.16
--- suspend.c 15 Aug 2004 16:39:10 -0000 1.15
+++ suspend.c 24 Oct 2004 20:37:27 -0000 1.16
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: suspend.c,v 1.15 2004/08/15 16:39:10 chorns Exp $
+/* $Id: suspend.c,v 1.16 2004/10/24 20:37:27 weiden Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ps/suspend.c
@@ -135,7 +135,7 @@
NTSTATUS STDCALL
NtResumeThread(IN HANDLE ThreadHandle,
- IN PULONG SuspendCount)
+ IN PULONG SuspendCount OPTIONAL)
/*
* FUNCTION: Decrements a thread's resume count
* ARGUMENTS:
@@ -182,7 +182,7 @@
NTSTATUS STDCALL
NtSuspendThread(IN HANDLE ThreadHandle,
- IN PULONG PreviousSuspendCount)
+ IN PULONG PreviousSuspendCount OPTIONAL)
/*
* FUNCTION: Increments a thread's suspend count
* ARGUMENTS:
reactos/ntoskrnl/ps
diff -u -r1.29 -r1.30
--- tinfo.c 28 Sep 2004 15:02:29 -0000 1.29
+++ tinfo.c 24 Oct 2004 20:37:27 -0000 1.30
@@ -1,4 +1,4 @@
-/* $Id: tinfo.c,v 1.29 2004/09/28 15:02:29 weiden Exp $
+/* $Id: tinfo.c,v 1.30 2004/10/24 20:37:27 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -222,7 +222,7 @@
IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
IN ULONG ThreadInformationLength,
- OUT PULONG ReturnLength)
+ OUT PULONG ReturnLength OPTIONAL)
{
PETHREAD Thread;
NTSTATUS Status;
reactos/w32api/include/ddk
diff -u -r1.7 -r1.8
--- ntapi.h 24 Sep 2004 20:55:58 -0000 1.7
+++ ntapi.h 24 Oct 2004 20:37:27 -0000 1.8
@@ -1163,26 +1163,27 @@
/* Threads */
-typedef struct _USER_STACK {
- PVOID FixedStackBase;
- PVOID FixedStackLimit;
- PVOID ExpandableStackBase;
- PVOID ExpandableStackLimit;
- PVOID ExpandableStackBottom;
-} USER_STACK, *PUSER_STACK;
+typedef struct _INITIAL_TEB
+{
+ PVOID StackBase;
+ PVOID StackLimit;
+ PVOID StackCommit;
+ PVOID StackCommitMax;
+ PVOID StackReserved;
+} INITIAL_TEB, *PINITIAL_TEB;
NTOSAPI
NTSTATUS
NTAPI
ZwCreateThread(
- OUT PHANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN HANDLE ProcessHandle,
- OUT PCLIENT_ID ClientId,
- IN PCONTEXT ThreadContext,
- IN PUSER_STACK UserStack,
- IN BOOLEAN CreateSuspended);
+ OUT PHANDLE ThreadHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN HANDLE ProcessHandle,
+ OUT PCLIENT_ID ClientId,
+ IN PCONTEXT ThreadContext,
+ IN PINITIAL_TEB InitialTeb,
+ IN BOOLEAN CreateSuspended);
NTOSAPI
NTSTATUS
CVSspam 0.2.8