[Vm-dev] [commit][3651] ... and on unix that will only be achieved by using signed division.

commits at squeakvm.org commits at squeakvm.org
Thu Mar 24 01:31:07 UTC 2016


Revision: 3651
Author:   eliot
Date:     2016-03-23 18:31:07 -0700 (Wed, 23 Mar 2016)
Log Message:
-----------
...and on unix that will only be achieved by using signed division.
Change all ULL's to LL's in the manifest constants in the heartbeat
time code.  This also fixes the bug whereby
	Time localMicrosecondClock - Time utcMicrosecondClock // 1000000
would answer something with an odd second, a multiple of 3600 plus 1.

Modified Paths:
--------------
    branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c
    branches/Cog/platforms/unix/vm/sqUnixITimerHeartbeat.c
    branches/Cog/platforms/unix/vm/sqUnixITimerTickerHeartbeat.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Wed Mar 23 18:02:37 PDT 2016
   + Wed Mar 23 18:29:03 PDT 2016

Modified: branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c	2016-03-24 01:03:08 UTC (rev 3650)
+++ branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c	2016-03-24 01:31:07 UTC (rev 3651)
@@ -34,13 +34,13 @@
 #include <sys/time.h>
 #include "sqaio.h"
 
-#define SecondsFrom1901To1970      2177452800ULL
-#define MicrosecondsFrom1901To1970 2177452800000000ULL
+#define SecondsFrom1901To1970      2177452800LL
+#define MicrosecondsFrom1901To1970 2177452800000000LL
 
-#define MicrosecondsPerSecond 1000000ULL
-#define MillisecondsPerSecond 1000ULL
+#define MicrosecondsPerSecond 1000000LL
+#define MillisecondsPerSecond 1000LL
 
-#define MicrosecondsPerMillisecond 1000ULL
+#define MicrosecondsPerMillisecond 1000LL
 
 static unsigned volatile long long utcMicrosecondClock;
 static unsigned volatile long long localMicrosecondClock;

Modified: branches/Cog/platforms/unix/vm/sqUnixITimerHeartbeat.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixITimerHeartbeat.c	2016-03-24 01:03:08 UTC (rev 3650)
+++ branches/Cog/platforms/unix/vm/sqUnixITimerHeartbeat.c	2016-03-24 01:31:07 UTC (rev 3651)
@@ -23,13 +23,13 @@
 #include <sys/types.h>
 #include <sys/time.h>
 
-#define SecondsFrom1901To1970      2177452800ULL
-#define MicrosecondsFrom1901To1970 2177452800000000ULL
+#define SecondsFrom1901To1970      2177452800LL
+#define MicrosecondsFrom1901To1970 2177452800000000LL
 
-#define MicrosecondsPerSecond 1000000ULL
-#define MillisecondsPerSecond 1000ULL
+#define MicrosecondsPerSecond 1000000LL
+#define MillisecondsPerSecond 1000LL
 
-#define MicrosecondsPerMillisecond 1000ULL
+#define MicrosecondsPerMillisecond 1000LL
 
 static unsigned volatile long long utcMicrosecondClock;
 static unsigned volatile long long localMicrosecondClock;

Modified: branches/Cog/platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixITimerTickerHeartbeat.c	2016-03-24 01:03:08 UTC (rev 3650)
+++ branches/Cog/platforms/unix/vm/sqUnixITimerTickerHeartbeat.c	2016-03-24 01:31:07 UTC (rev 3651)
@@ -26,13 +26,13 @@
 #include <sys/types.h>
 #include <sys/time.h>
 
-#define SecondsFrom1901To1970      2177452800ULL
-#define MicrosecondsFrom1901To1970 2177452800000000ULL
+#define SecondsFrom1901To1970      2177452800LL
+#define MicrosecondsFrom1901To1970 2177452800000000LL
 
-#define MicrosecondsPerSecond 1000000ULL
-#define MillisecondsPerSecond 1000ULL
+#define MicrosecondsPerSecond 1000000LL
+#define MillisecondsPerSecond 1000LL
 
-#define MicrosecondsPerMillisecond 1000ULL
+#define MicrosecondsPerMillisecond 1000LL
 
 static unsigned volatile long long utcMicrosecondClock;
 static unsigned volatile long long localMicrosecondClock;



More information about the Vm-dev mailing list