瀏覽代碼

Obsd.Kernel.Time fixed

Alexander Shiryaev 12 年之前
父節點
當前提交
f8406f6b0c
共有 2 個文件被更改,包括 12 次插入3 次删除
  1. 二進制
      BlackBox/Lin/Mod/Obsd.linKernel.odc
  2. 12 3
      BlackBox/Lin/Mod/Obsd.linKernel.txt

二進制
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 *)