Jelajahi Sumber

Fixed initialisation of processor count

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6423 8c9fc860-2736-0410-a75d-ab315db34111
eth.negelef 9 tahun lalu
induk
melakukan
779f2ac0eb
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      source/RPI.Processors.Mod

+ 3 - 2
source/RPI.Processors.Mod

@@ -10,7 +10,7 @@ IMPORT SYSTEM, Counters, CPU;
 CONST Maximum* = 4 + CPU.Interrupts;
 
 (** Holds the actual number of processors in the system. *)
-VAR count- := 4: SIZE;
+VAR count-: SIZE;
 
 VAR running: Counters.AlignedCounter; (* counts the number of application processors currently running *)
 
@@ -39,7 +39,7 @@ CODE
 	SEV
 END StartAll;
 
-PROCEDURE {NORETURN} Boot;
+PROCEDURE {NORETURN, NOPAF} Boot;
 PROCEDURE Idle EXTERN "Activities.Idle";
 PROCEDURE Execute EXTERN "Activities.Execute" (procedure: PROCEDURE);
 BEGIN {UNCOOPERATIVE, UNCHECKED}
@@ -68,6 +68,7 @@ BEGIN {UNCOOPERATIVE, UNCHECKED}
 	CPU.WriteWord (Core2Mailbox, ADDRESS OF Boot);
 	CPU.WriteWord (Core3Mailbox, ADDRESS OF Boot);
 	REPEAT UNTIL Counters.Read (running) = 3;
+	count := 4;
 END Initialize;
 
 (** Terminates the module and waits for all other processors to stop their execution. *)