[M3commit] CVS Update: cm3
Jay K
jay.krell at cornell.edu
Fri Sep 6 07:31:56 CEST 2013
again -- all platforms blow up here in 2038.
Index: src/EventWireRep.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-comm/events/src/EventWireRep.m3,v
retrieving revision 1.2
diff -u -r1.2 EventWireRep.m3
--- src/EventWireRep.m3 2 Dec 2001 00:20:38 -0000 1.2
+++ src/EventWireRep.m3 6 Sep 2013 05:24:23 -0000
@@ -80,21 +80,26 @@
UNSAFE MODULE EventWireRep;
-IMPORT EventSpaceID, Time, Word, Fmt; (* IO *)
+IMPORT NetObjEpoch, EventSpaceID, Time, Word, Fmt; (* IO *)
TYPE
Int32 = BITS 32 FOR [-2147483647-1..2147483647];
TRep = RECORD ts: Int32; objNum: Int32; space: EventSpaceID.T; END;
-VAR myTs: Int32 := ROUND(Time.Now());
+VAR myTs: Int32 := GetTime();
myObjNum := 0;
mu := NEW(MUTEX);
+PROCEDURE GetTime (): Int32 =
+ BEGIN
+ RETURN ROUND (Time.Now () - NetObjEpoch.T);
+ END GetTime;
+
PROCEDURE New() : T =
VAR wt: TRep;
BEGIN
LOCK mu DO
- IF myObjNum = LAST(Int32) THEN myTs := ROUND(Time.Now()); END;
+ IF myObjNum = LAST(Int32) THEN myTs := GetTime(); END;
INC(myObjNum);
wt.ts := myTs;
wt.objNum := myObjNum;
Index: src/m3makefile
===================================================================
RCS file: /usr/cvs/cm3/m3-comm/events/src/m3makefile,v
retrieving revision 1.2
diff -u -r1.2 m3makefile
--- src/m3makefile 2 Dec 2001 00:20:38 -0000 1.2
+++ src/m3makefile 6 Sep 2013 05:24:23 -0000
@@ -2,6 +2,7 @@
%import ("sequences")
import ("listfuncs")
import ("parseparams")
+import("netobj")
List ("EventConn","EventConn")
ListFuncs ("EventConn","EventConn","EventConnList")
- Jay
> Date: Fri, 6 Sep 2013 07:30:44 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 13/09/06 07:30:44
>
> Modified files:
> cm3/m3-comm/events/src/: EventWireRep.m3 m3makefile
>
> Log message:
> m3-comm/events is an out of date fork of m3-obliq/obliqrt
>
> m3-comm/events contains this code:
> Int32 := Time.Now();
>
> m3-obliq contains similar:
> Int32 := Time.Now() - Epoch;
> Posix.Epoch = 0
> Win32.Epoch = 1970
>
> m3-comm (i.e. starting mentor) fails on AMD64_NT because we are
> more than 2 billion seconds into the Win32 epoch (starting in 1601)
> I386_NT succeeds albeit bogosusly -- the whole float to integer
> conversion lacking any range chech..
>
> Port m3-obliq to m3-comm.
> This should fix AMD64_NT.
>
> All platforms will blow up here in 2038.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20130906/7d37d53c/attachment-0002.html>
More information about the M3commit
mailing list