projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tired of those old printfs
[unix-history]
/
usr
/
src
/
sys
/
vax
/
include
/
clock.h
diff --git
a/usr/src/sys/vax/include/clock.h
b/usr/src/sys/vax/include/clock.h
index
aa28a8f
..
f734d0c
100644
(file)
--- a/
usr/src/sys/vax/include/clock.h
+++ b/
usr/src/sys/vax/include/clock.h
@@
-1,14
+1,14
@@
-/* clock.h 4.
1 %G%
*/
+/* clock.h 4.
5 81/02/23
*/
/*
* VAX clock registers
*/
/*
* VAX clock registers
*/
-#define ICCS_RUN 0x1
-#define ICCS_TRANS 0x10
-#define ICCS_SS 0x20
-#define ICCS_IE 0x40
-#define ICCS_INT 0x80
+#define ICCS_RUN 0x
0000000
1
+#define ICCS_TRANS 0x
000000
10
+#define ICCS_SS 0x
000000
20
+#define ICCS_IE 0x
000000
40
+#define ICCS_INT 0x
000000
80
#define ICCS_ERR 0x80000000
#define SECDAY ((unsigned)(24*60*60)) /* seconds per day */
#define ICCS_ERR 0x80000000
#define SECDAY ((unsigned)(24*60*60)) /* seconds per day */
@@
-20,7
+20,7
@@
#define TODRZERO ((unsigned)(1<<28))
#define YRREF 1970
#define TODRZERO ((unsigned)(1<<28))
#define YRREF 1970
-#define LEAPYEAR(year) ((year)%4==0
&& year != 2000) /* good till 2100
*/
+#define LEAPYEAR(year) ((year)%4==0
) /* good till time becomes negative
*/
/*
* Start a 60 HZ clock.
/*
* Start a 60 HZ clock.
@@
-32,3
+32,8
@@
#define clkreld() mtpr(ICCS, ICCS_RUN+ICCS_IE+ICCS_INT+ICCS_ERR)
#define clkwrap() (((unsigned)mfpr(TODR) - TODRZERO)/100 > SECYR+SECDAY)
#define clkreld() mtpr(ICCS, ICCS_RUN+ICCS_IE+ICCS_INT+ICCS_ERR)
#define clkwrap() (((unsigned)mfpr(TODR) - TODRZERO)/100 > SECYR+SECDAY)
+
+/*
+ * Software clock is software interrupt level 8
+ */
+#define setsoftclock() mtpr(SIRR, 0x8)