Quellcode durchsuchen

Obsd.Kernel.Time fixed

Alexander Shiryaev vor 12 Jahren
Ursprung
Commit
f8406f6b0c
2 geänderte Dateien mit 12 neuen und 3 gelöschten Zeilen
  1. BIN
      BlackBox/Lin/Mod/Obsd.linKernel.odc
  2. 12 3
      BlackBox/Lin/Mod/Obsd.linKernel.txt

BIN
BlackBox/Lin/Mod/Obsd.linKernel.odc


+ 12 - 3
BlackBox/Lin/Mod/Obsd.linKernel.txt

@@ -535,8 +535,12 @@ L1:
 		VAR t: INTEGER;
 	BEGIN
 		(* A. V. Shiryaev *)
-		(* processor time to milliseconds *)
-		t := (1000 * LinLibc.clock()) DIV LinLibc.CLOCKS_PER_SEC;
+			(* processor time to milliseconds *)
+				(* incorrect (integers overflows on multiplication) *)
+					(* t := (1000 * LinLibc.clock()) DIV LinLibc.CLOCKS_PER_SEC; *)
+				(* ok *)
+					ASSERT(LinLibc.CLOCKS_PER_SEC = 100);
+					t := 10 * LinLibc.clock();
 
 		IF t < told THEN INC(shift) END;
 		told := t;
@@ -2551,7 +2555,12 @@ BEGIN
 		IF bootInfo # NIL THEN
 			modList := bootInfo.modList; (* boot loader initializes the bootInfo struct *)
 			SYSTEM.GETREG(SP, baseStack); (* TODO: Check that this is ok. *)
-			SetOpts;
+			
+			(* A. V. Shiryaev, 2012.09 *)
+				(* SetOpts; *)
+				static := init IN modList.opts;
+				inDll := dll IN modList.opts;
+			
 			SetCmdLine
 		ELSE
 			SYSTEM.GETREG(ML, modList);	(* linker loads module list to BX *)