瀏覽代碼

Linux Kernel.Time: clock -> clock_gettime

Alexander Shiryaev 11 年之前
父節點
當前提交
07ad48856e
共有 5 個文件被更改,包括 30 次插入0 次删除
  1. 4 0
      new/_FreeBSDLinuxOpenBSD_Interp/build
  2. 26 0
      new/_Linux_/Lin/Mod/Rt.txt
  3. 二進制
      new/_Linux_/System/Mod/Kernel.odc
  4. 二進制
      new/_Linux_/libBB.so
  5. 二進制
      new/_Linux_/libBB0.so

+ 4 - 0
new/_FreeBSDLinuxOpenBSD_Interp/build

@@ -4,6 +4,10 @@
 ConsCompiler.Compile('Lin/Mod', 'Dl.txt')
 ConsCompiler.Compile('Lin/Mod', 'Libc.txt')
 ConsCompiler.Compile('Lin/Mod', 'Iconv.txt')
+
+# Linux only
+ConsCompiler.Compile('Lin/Mod', 'Rt.txt')
+
 DevCompiler.CompileThis Kernel
 
 DevCompiler.CompileThis Files Console Math Strings Meta Dialog

+ 26 - 0
new/_Linux_/Lin/Mod/Rt.txt

@@ -0,0 +1,26 @@
+MODULE LinRt ["librt.so.1"];
+
+	(*
+		A. V. Shiryaev, 2013.12
+
+		GNU/Linux
+		32-bit
+	*)
+
+	CONST
+		CLOCK_REALTIME* = 0;
+		CLOCK_MONOTONIC* = 1;
+	
+	TYPE
+		time_t* = INTEGER;
+
+		timespec_t* = RECORD [untagged]
+			tv_sec*: time_t; (* seconds *)
+			tv_nsec*: INTEGER (* nanoseconds *)
+		END;
+
+		clockid_t* = INTEGER;
+
+	PROCEDURE [ccall] clock_gettime* (clock_id: clockid_t; VAR tp: timespec_t): INTEGER;
+
+END LinRt.

二進制
new/_Linux_/System/Mod/Kernel.odc


二進制
new/_Linux_/libBB.so


二進制
new/_Linux_/libBB0.so