mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Allow the system process and a process without a parent process to use all cpus on a smp machine, even if only the boot cpu is running.
svn path=/trunk/; revision=18035
This commit is contained in:
parent
7ee5d3ea71
commit
1effd8ff68
2 changed files with 15 additions and 0 deletions
|
@ -220,7 +220,14 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pParentProcess = NULL;
|
pParentProcess = NULL;
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
/* FIXME:
|
||||||
|
* Only the boot cpu is initialized in the early boot phase.
|
||||||
|
*/
|
||||||
|
Affinity = 0xffffffff;
|
||||||
|
#else
|
||||||
Affinity = KeActiveProcessors;
|
Affinity = KeActiveProcessors;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the debug port */
|
/* Add the debug port */
|
||||||
|
|
|
@ -220,7 +220,15 @@ PsInitProcessManagment(VOID)
|
||||||
|
|
||||||
/* System threads may run on any processor. */
|
/* System threads may run on any processor. */
|
||||||
RtlZeroMemory(PsInitialSystemProcess, sizeof(EPROCESS));
|
RtlZeroMemory(PsInitialSystemProcess, sizeof(EPROCESS));
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
/* FIXME:
|
||||||
|
* Only the boot cpu is initialized. Threads of the
|
||||||
|
* system process should be able to run on all cpus.
|
||||||
|
*/
|
||||||
|
PsInitialSystemProcess->Pcb.Affinity = 0xffffffff;
|
||||||
|
#else
|
||||||
PsInitialSystemProcess->Pcb.Affinity = KeActiveProcessors;
|
PsInitialSystemProcess->Pcb.Affinity = KeActiveProcessors;
|
||||||
|
#endif
|
||||||
PsInitialSystemProcess->Pcb.IopmOffset = 0xffff;
|
PsInitialSystemProcess->Pcb.IopmOffset = 0xffff;
|
||||||
PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIORITY_NORMAL;
|
PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIORITY_NORMAL;
|
||||||
PsInitialSystemProcess->Pcb.QuantumReset = 6;
|
PsInitialSystemProcess->Pcb.QuantumReset = 6;
|
||||||
|
|
Loading…
Reference in a new issue