Allow the system process and a process without a parent process to use all cpus on...
authorHartmut Birr <osexpert@googlemail.com>
Sat, 24 Sep 2005 19:34:54 +0000 (19:34 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sat, 24 Sep 2005 19:34:54 +0000 (19:34 +0000)
svn path=/trunk/; revision=18035

reactos/ntoskrnl/ps/process.c
reactos/ntoskrnl/ps/psmgr.c

index 9901e47..e2f36f7 100644 (file)
@@ -220,7 +220,14 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
     else
     {
         pParentProcess = NULL;
     else
     {
         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 */
index 2f6cad5..7617277 100644 (file)
@@ -220,7 +220,15 @@ PsInitProcessManagment(VOID)
 
    /* System threads may run on any processor. */
    RtlZeroMemory(PsInitialSystemProcess, sizeof(EPROCESS));
 
    /* System threads may run on any processor. */
    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.BasePriority = PROCESS_PRIORITY_NORMAL;
    PsInitialSystemProcess->Pcb.QuantumReset = 6;
    PsInitialSystemProcess->Pcb.IopmOffset = 0xffff;
    PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIORITY_NORMAL;
    PsInitialSystemProcess->Pcb.QuantumReset = 6;