Browse Source

Adapted Generic.Modules.Mod to the ARM kernel.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6387 8c9fc860-2736-0410-a75d-ab315db34111
eth.tmartiel 9 years ago
parent
commit
bdd5343d94
1 changed files with 8 additions and 2 deletions
  1. 8 2
      source/Generic.Modules.Mod

+ 8 - 2
source/Generic.Modules.Mod

@@ -337,6 +337,7 @@ BEGIN
 	IF module.body # NIL THEN module.body END;
 	module.init := TRUE;
 	*)
+	(*TRACE("TODO", module, module.name);*)
 	Publish (module, new);
 	callagain := FALSE;
 	IF new THEN
@@ -345,8 +346,13 @@ BEGIN
 			module.init := TRUE;
 		END;
 		IF module.body # NIL THEN module.body END;
-		IF callagain THEN PublishRegisteredModules (* does not return *) END;
-		module.init := TRUE;
+		IF callagain THEN
+			PublishRegisteredModules (* does not return on intel architecture. Returns on ARM but looses procedure stack frame: we are not allowed to refer to local variables after this *)
+			(*; HALT(400)*)
+		ELSE
+			(*TRACE('INITIALIZED', module, module.name);*)
+			module.init := TRUE;
+		END;
 	END;
 END Initialize0;