FreeBSD/Linux Kernel Cross Reference
sys/sqt/clock.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 Carnegie Mellon University
4 * Copyright (c) 1991 Sequent Computer Systems
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
12 *
13 * CARNEGIE MELLON AND SEQUENT COMPUTER SYSTEMS ALLOW FREE USE OF
14 * THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND
15 * SEQUENT COMPUTER SYSTEMS DISCLAIM ANY LIABILITY OF ANY KIND FOR
16 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 *
18 * Carnegie Mellon requests users of this software to return to
19 *
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
24 *
25 * any improvements or extensions that they make and grant Carnegie Mellon
26 * the rights to redistribute these changes.
27 */
28
29 /*
30 * HISTORY
31 * $Log: clock.h,v $
32 * Revision 2.3 91/07/31 18:00:31 dbg
33 * Changed copyright.
34 * [91/07/31 dbg]
35 *
36 * Revision 2.2 91/05/08 12:55:15 dbg
37 * Added, from Sequent SYMMETRY sources.
38 * [91/02/26 dbg]
39 *
40 */
41
42 /*
43 * $Header: clock.h,v 2.3 91/07/31 18:00:31 dbg Exp $
44 */
45
46 /*
47 * Revision 1.1 89/07/19 14:48:53 kak
48 * Initial revision
49 *
50 */
51
52 #ifndef _SQT_CLOCK_H_
53 #define _SQT_CLOCK_H_
54
55 #define HZ 100
56
57 #define TODFREQ 1000 / HZ /* 10 milliseconds */
58 #define SECDAY ((unsigned)(24*60*60)) /* seconds per day */
59 #define SECYR ((unsigned)(365*SECDAY)) /* per common year */
60
61 #define YRREF 1970
62 #define LEAPYEAR(year) ((year)%4==0) /* good till time becomes negative */
63
64 /*
65 * Local and tod clock bin and vector. The vector is defined by SLIC as 0x00.
66 */
67
68 #define LCLKBIN 7 /* highest priority */
69 #define LCLKVEC 0x00 /* according to SLIC */
70
71 #define TODCLKBIN 7 /* highest priority */
72 #define TODCLKVEC 0x01
73
74
75 /*
76 * System clock rate in Mhz
77 */
78
79 extern unsigned int sys_clock_rate;
80
81 #endif /* _SQT_CLOCK_H_ */
Cache object: 4438b2946d5864ed92dbb7544d170ba0
|