Skip to content

Commit 4097d3c

Browse files
committed
CogVM source as per VMMaker.oscog-eem.2929
Bow to LLP64 and type ioMicroMSecs as unigned int.
1 parent ae12dfc commit 4097d3c

File tree

15 files changed

+120
-119
lines changed

15 files changed

+120
-119
lines changed

platforms/Cross/vm/sq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797
the clock to return the time right now, rather than of the last heartbeat.
9898
*/
9999

100-
usqInt ioMSecs(void);
101-
usqInt ioMicroMSecs(void);
100+
unsigned int ioMSecs(void);
101+
unsigned int ioMicroMSecs(void);
102102

103103
/* duplicate the generated definition in the interpreter. If they differ the
104104
* compiler will complain and catch it for us. We use 0x1FFFFFFF instead of

platforms/Cross/vm/sqVirtualMachine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ typedef struct VirtualMachine {
239239
#if VM_PROXY_MINOR > 3
240240

241241
void *(*ioLoadFunctionFrom)(char *fnName, char *modName);
242-
usqInt (*ioMicroMSecs)(void);
242+
unsigned int (*ioMicroMSecs)(void);
243243

244244
#endif
245245

@@ -544,7 +544,7 @@ sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r,
544544
sqInt signalSemaphoreWithIndex(sqInt semaIndex);
545545
sqInt success(sqInt aBoolean);
546546
sqInt superclassOf(sqInt classPointer);
547-
usqInt ioMicroMSecs(void);
547+
unsigned int ioMicroMSecs(void);
548548
unsigned long long ioUTCMicroseconds(void);
549549
unsigned long long ioUTCMicrosecondsNow(void);
550550
void forceInterruptCheck(void);

platforms/Mac OS/vm/Developer/sqMacMinimal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ int ioGetKeystroke(void) {
453453
return keystate;
454454
}
455455

456-
int ioMicroMSecs(void) {
456+
unsigned int ioMicroMSecs(void) {
457457
/* millisecond clock based on microsecond timer (about 60 times slower than clock()!!) */
458458
/* Note: This function and ioMSecs() both return a time in milliseconds. The difference
459459
is that ioMicroMSecs() is called only when precise millisecond resolution is essential,
@@ -468,7 +468,7 @@ int ioMicroMSecs(void) {
468468
return (microTicks.lo / 1000) + (microTicks.hi * 4294967);
469469
}
470470

471-
sqInt ioMSecs(void) {
471+
unsigned int ioMSecs(void) {
472472
/* return a time in milliseconds for use in Delays and Time millisecondClockValue */
473473
/* Note: This was once a macro based on clock(); it now uses the microsecond clock for
474474
greater resolution. See the comment in ioMicroMSecs(). */

platforms/Mac OS/vm/sqMacTime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SetUpTimers(void)
7070
PrimeTime((QElemPtr)&gTMTask.qLink,LOW_RES_TICK_MSECS);
7171
}
7272

73-
int
73+
unsigned int
7474
ioMicroMSecs(void)
7575
{
7676
struct timeval now;
@@ -122,7 +122,7 @@ sqInt ioRelinquishProcessorForMicroseconds(sqInt microSeconds) {
122122
#undef ioMSecs
123123
//Issue with unix aio.c sept 2003
124124

125-
long ioMSecs() { return ioMicroMSecs(); }
125+
unsigned int ioMSecs() { return ioMicroMSecs(); }
126126

127127
#define SecondsFrom1901To1970 2177452800ULL
128128
#define MicrosecondsFrom1901To1970 2177452800000000ULL

platforms/Plan9/vm/sqPlan9io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ioMSecs(void)
7777
return (now - start_time)/1000000;
7878
}
7979

80-
usqInt
80+
unsigned int
8181
ioMicroMSecs(void) { return ioMSecs(); }
8282

8383
sqInt ioSeconds(void) {

platforms/RiscOS/vm/sqRPCMain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ unsigned int microsecondsvalue(void) {
361361
return 1000 * millisecondTimerValue();
362362
}
363363

364-
usqInt
364+
unsigned int
365365
ioMicroMSecs(void) {
366366
/* The
367367
function ioMicroMSecs() is used only to collect timing statistics

platforms/minheadless/common/sqaio.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ extern unsigned long long ioUTCMicrosecondsNow(void);
109109
platReportError((os_error *)&privateErr); \
110110
} while (0)
111111
# else /* !ACORN */
112-
extern long aioLastTick, aioThisTick, ioMSecs(void);
112+
extern long aioLastTick, aioThisTick; \
113+
extern unsigned int ioMSecs(void);
113114
extern const char *__shortFileName(const char *);
114115
# define FPRINTF(X) do { \
115116
aioThisTick = ioMSecs(); \

platforms/unix/vm/sqUnixHeartbeat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ unsigned long long
216216
ioLocalMicrosecondsNow() { return currentUTCMicroseconds() + vmGMTOffset; };
217217

218218
/* ioMSecs answers the millisecondClock as of the last tick. */
219-
usqInt
219+
unsigned int
220220
ioMSecs() { return millisecondClock; }
221221

222222
/* ioMicroMSecs answers the millisecondClock right now */
223-
usqInt
223+
unsigned int
224224
ioMicroMSecs(void) { return microToMilliseconds(currentUTCMicroseconds());}
225225

226226
/* returns the local wall clock time */

platforms/unix/vm/sqUnixITimerHeartbeat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ unsigned long long
205205
ioLocalMicrosecondsNow() { return currentUTCMicroseconds() + vmGMTOffset; };
206206

207207
/* ioMSecs answers the millisecondClock as of the last tick. */
208-
usqInt
208+
unsigned int
209209
ioMSecs() { return millisecondClock; }
210210

211211
/* ioMicroMSecs answers the millisecondClock right now */
212-
usqInt
212+
unsigned int
213213
ioMicroMSecs(void) { return microToMilliseconds(currentUTCMicroseconds());}
214214

215215
/* returns the local wall clock time */

platforms/unix/vm/sqUnixITimerTickerHeartbeat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ unsigned long long
208208
ioLocalMicrosecondsNow() { return currentUTCMicroseconds() + vmGMTOffset; };
209209

210210
/* ioMSecs answers the millisecondClock as of the last tick. */
211-
usqInt
211+
unsigned int
212212
ioMSecs() { return millisecondClock; }
213213

214214
/* ioMicroMSecs answers the millisecondClock right now */
215-
usqInt
215+
unsigned int
216216
ioMicroMSecs(void) { return microToMilliseconds(currentUTCMicroseconds());}
217217

218218
/* returns the local wall clock time */

0 commit comments

Comments
 (0)