2
0
Эх сурвалжийг харах

Init process now has a dummy active object.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6645 8c9fc860-2736-0410-a75d-ab315db34111
eth.tmartiel 9 жил өмнө
parent
commit
9fe3bf7a81
1 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. 3 1
      source/Objects.Mod

+ 3 - 1
source/Objects.Mod

@@ -383,6 +383,7 @@ VAR
 
 	rootedProcesses: ARRAY NumPriorities OF Process; (* list of potential processes that are not traced by GC when processing the ready queues, since GC only traces processes with
 	                                                                                      priorities Low ... High in ready queues. The potentially not traced processes are rooted here and traced by the GC *)
+	initObject: ProtectedObject;	(* Active object for the init process *)
 
 	event: Timer;	(* list of events *)
 
@@ -1798,7 +1799,8 @@ BEGIN
 	(* create a process for rest of init code, which runs at user level *)
 	entry := Machine.CurrentBP ();
 	SYSTEM.GET (entry+AddressSize, entry);	(* return address into linker-generated call table *)
-	NewProcess(SYSTEM.VAL (Body, entry), {Resistant}, NIL, init); (* create init process *)
+	NEW(initObject);
+	NewProcess(SYSTEM.VAL (Body, entry), {Resistant}, initObject, init); (* create init process *)
 	init.priority := High;
 	init.staticPriority := init.priority;
 	(* initialize prioRequests for init process *)