- Fix one of the oldest hacks in ReactOS: KeGetCurrentThread() and PsGetcurrentProcess used to be NULL during early boot stage. We also didn't have an official idle therad/process. Also system intialization was not in its sepearte thread. Changes:
- Implemented SeAssignPrimaryToken.
- Setup Boot/System Token for Idle Process in SeInit2.
- Remove ROS hack in SeCaptureSubjectContextEx.
- Call SeAssignPrimaryToken in PspInitializeProcessSecurty when called for the Initial Process creation.
- Implement PsInitiailizeQuotaSystem and set PspDefauptQuotaBlock for the idle process so that it can be used for the initial process.
- Rewrite Process Manager Phase 0 initialization from scratch, to create a new initial system process and thread which will be used for Phase 1 (in ROS, phase 2) initialization of the executive.
- Fix a bug in PspCreateProcess which was using an uninitialized value of SectionObject in some cases, instead of NULL.
- Call PsInitailizeQuotaSystem from ObInit, and also create the system handle table inside the idle process, and make it the ObpKernelHandleTable.
- Do Executive Phase 0 Initialization at APC_LEVEL.
- Start idle thread at HIGH_PRIORITY then lower it to 0 once the Initial Thread is setup, so that it can run, then keep priority to 0 at DISPATCH_LEVEL and jump into idle loop code.
- Add NtYieldExecution to idle loop code since it's now being used.
- Fix IoGetCurrentProcess which was previously hacked.
- Remove some checks for Thread == NULL in ke_x.h, since this is now impossible.
- Split Phase 0/1 initialization in ex\init.c, since one runs in a separate thread now. Also don't lower IRQL to PASSIVE_LEVEL anymore (run at APC_LEVEL).
svn path=/trunk/; revision=24148
14 files changed: