mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- KPROCSES Flags are LONG, not ULONG.
- Add some missing decoration. - NUMA node semantics for KeInitializeProcess are only required on SMP builds. - Allow KeInitailizeProcess to receive an argument specifying if alignment faults should be enabled or not. - Use KiComputeIopmOffset to get the IopmOFfset instead of setting -1 svn path=/trunk/; revision=24047
This commit is contained in:
parent
5e7a9fc74e
commit
d7ae142cf1
5 changed files with 28 additions and 22 deletions
|
@ -905,7 +905,7 @@ typedef struct _KPROCESS
|
|||
{
|
||||
DISPATCHER_HEADER Header;
|
||||
LIST_ENTRY ProfileListHead;
|
||||
PHYSICAL_ADDRESS DirectoryTableBase;
|
||||
LARGE_INTEGER DirectoryTableBase;
|
||||
#if defined(_M_IX86)
|
||||
KGDTENTRY LdtDescriptor;
|
||||
KIDTENTRY Int21Descriptor;
|
||||
|
@ -926,12 +926,12 @@ typedef struct _KPROCESS
|
|||
{
|
||||
struct
|
||||
{
|
||||
ULONG AutoAlignment:1;
|
||||
ULONG DisableBoost:1;
|
||||
ULONG DisableQuantum:1;
|
||||
ULONG ReservedFlags:29;
|
||||
LONG AutoAlignment:1;
|
||||
LONG DisableBoost:1;
|
||||
LONG DisableQuantum:1;
|
||||
LONG ReservedFlags:29;
|
||||
};
|
||||
ULONG ProcessFlags;
|
||||
LONG ProcessFlags;
|
||||
};
|
||||
SCHAR BasePriority;
|
||||
SCHAR QuantumReset;
|
||||
|
@ -943,9 +943,7 @@ typedef struct _KPROCESS
|
|||
union
|
||||
{
|
||||
KEXECUTE_OPTIONS Flags;
|
||||
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
|
||||
UCHAR ExecuteOptions;
|
||||
#endif
|
||||
};
|
||||
ULONG StackCount;
|
||||
LIST_ENTRY ProcessListEntry;
|
||||
|
|
|
@ -505,7 +505,8 @@ KeInitializeProcess(
|
|||
struct _KPROCESS *Process,
|
||||
KPRIORITY Priority,
|
||||
KAFFINITY Affinity,
|
||||
LARGE_INTEGER DirectoryTableBase
|
||||
PLARGE_INTEGER DirectoryTableBase,
|
||||
IN BOOLEAN Enable
|
||||
);
|
||||
|
||||
VOID
|
||||
|
|
|
@ -147,7 +147,8 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
|
|||
KeInitializeProcess(InitProcess,
|
||||
0,
|
||||
0xFFFFFFFF,
|
||||
PageDirectory);
|
||||
&PageDirectory,
|
||||
FALSE);
|
||||
InitProcess->QuantumReset = MAXCHAR;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -52,10 +52,10 @@ UpdatePageDirs(IN PKTHREAD Thread,
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
KiAttachProcess(PKTHREAD Thread,
|
||||
PKPROCESS Process,
|
||||
PKLOCK_QUEUE_HANDLE ApcLock,
|
||||
PRKAPC_STATE SavedApcState)
|
||||
KiAttachProcess(IN PKTHREAD Thread,
|
||||
IN PKPROCESS Process,
|
||||
IN PKLOCK_QUEUE_HANDLE ApcLock,
|
||||
IN PRKAPC_STATE SavedApcState)
|
||||
{
|
||||
ASSERT(Process != Thread->ApcState.Process);
|
||||
|
||||
|
@ -109,11 +109,14 @@ NTAPI
|
|||
KeInitializeProcess(IN OUT PKPROCESS Process,
|
||||
IN KPRIORITY Priority,
|
||||
IN KAFFINITY Affinity,
|
||||
IN LARGE_INTEGER DirectoryTableBase)
|
||||
IN PLARGE_INTEGER DirectoryTableBase,
|
||||
IN BOOLEAN Enable)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
ULONG i = 0;
|
||||
UCHAR IdealNode = 0;
|
||||
PKNODE Node;
|
||||
#endif
|
||||
|
||||
/* Initialize the Dispatcher Header */
|
||||
KeInitializeDispatcherHeader(&Process->Header,
|
||||
|
@ -125,9 +128,9 @@ KeInitializeProcess(IN OUT PKPROCESS Process,
|
|||
Process->Affinity = Affinity;
|
||||
Process->BasePriority = (CHAR)Priority;
|
||||
Process->QuantumReset = 6;
|
||||
Process->DirectoryTableBase = DirectoryTableBase;
|
||||
Process->AutoAlignment = TRUE;
|
||||
Process->IopmOffset = 0xFFFF;
|
||||
Process->DirectoryTableBase = *DirectoryTableBase;
|
||||
Process->AutoAlignment = Enable;
|
||||
Process->IopmOffset = KiComputeIopmOffset(IO_ACCESS_MAP_NONE);
|
||||
|
||||
/* Initialize the lists */
|
||||
InitializeListHead(&Process->ThreadListHead);
|
||||
|
@ -138,6 +141,7 @@ KeInitializeProcess(IN OUT PKPROCESS Process,
|
|||
Process->State = ProcessInMemory;
|
||||
|
||||
/* Check how many Nodes there are on the system */
|
||||
#ifdef CONFIG_SMP
|
||||
if (KeNumberNodes > 1)
|
||||
{
|
||||
/* Set the new seed */
|
||||
|
@ -173,13 +177,14 @@ KeInitializeProcess(IN OUT PKPROCESS Process,
|
|||
Process->ThreadSeed = KeFindNextRightSetAffinity(Node->Seed,
|
||||
(ULONG)Affinity);
|
||||
Node->Seed = Process->ThreadSeed;
|
||||
#endif
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
KeSetProcess(PKPROCESS Process,
|
||||
KPRIORITY Increment,
|
||||
BOOLEAN InWait)
|
||||
KeSetProcess(IN PKPROCESS Process,
|
||||
IN KPRIORITY Increment,
|
||||
IN BOOLEAN InWait)
|
||||
{
|
||||
KIRQL OldIrql;
|
||||
ULONG OldState;
|
||||
|
|
|
@ -582,7 +582,8 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
KeInitializeProcess(&Process->Pcb,
|
||||
PROCESS_PRIORITY_NORMAL,
|
||||
Affinity,
|
||||
DirectoryTableBase);
|
||||
&DirectoryTableBase,
|
||||
Process->DefaultHardErrorProcessing & 4);
|
||||
|
||||
/* Duplicate Parent Token */
|
||||
Status = PspInitializeProcessSecurity(Process, Parent);
|
||||
|
|
Loading…
Reference in a new issue