int8: char -> signed char
[unix-history] / usr / src / sys / vax / include / clock.h
index 89724c8..91ab0ed 100644 (file)
@@ -1,9 +1,10 @@
-/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1982, 1986 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.proprietary.c%
  *
  *
- *     @(#)clock.h     7.1 (Berkeley) %G%
+ *     @(#)clock.h     7.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
  * Software clock is software interrupt level 8,
  * implemented as mtpr(SIRR, 0x8) in asm.sed.
  */
  * Software clock is software interrupt level 8,
  * implemented as mtpr(SIRR, 0x8) in asm.sed.
  */
+
+#ifndef LOCORE
+/*
+ * 8200s and 630s have a clock chip like those found in digital alarm
+ * clocks and watches.  Converting this to and from system times is
+ * painful, so we do it in only one place.  The routine chiptotime()
+ * converts a chiptime to the right value for time.tv_sec, and
+ * timetochip converts time.tv_sec back.
+ */
+struct chiptime {
+       int     sec;
+       int     min;
+       int     hour;
+       int     day;
+       int     mon;
+       int     year;
+};
+
+/*
+ * Clock read routine return values.
+ */
+#define        CLKREAD_OK      0       /* success, time.tv_sec set */
+#define        CLKREAD_WARN    1       /* clock appears wrong but time set anyway */
+#define        CLKREAD_BAD     2       /* clock is bad, no time available */
+#endif