clockvar.h revision 1.5
11.5Swiz/* $NetBSD: clockvar.h,v 1.5 2004/02/13 11:36:21 wiz Exp $ */ 21.1Scgd 31.1Scgd/* 41.1Scgd * Copyright (c) 1994, 1995 Carnegie-Mellon University. 51.1Scgd * All rights reserved. 61.1Scgd * 71.1Scgd * Author: Chris G. Demetriou 81.1Scgd * 91.1Scgd * Permission to use, copy, modify and distribute this software and 101.1Scgd * its documentation is hereby granted, provided that both the copyright 111.1Scgd * notice and this permission notice appear in all copies of the 121.1Scgd * software, derivative works or modified versions, and any portions 131.1Scgd * thereof, and that both notices appear in supporting documentation. 141.1Scgd * 151.1Scgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 161.1Scgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 171.1Scgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 181.1Scgd * 191.1Scgd * Carnegie Mellon requests users of this software to return to 201.1Scgd * 211.1Scgd * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 221.1Scgd * School of Computer Science 231.1Scgd * Carnegie Mellon University 241.1Scgd * Pittsburgh PA 15213-3890 251.1Scgd * 261.1Scgd * any improvements or extensions that they make and grant Carnegie the 271.1Scgd * rights to redistribute these changes. 281.1Scgd */ 291.1Scgd 301.1Scgd/* 311.5Swiz * Definitions for CPU-independent clock handling for the alpha and pmax. 321.1Scgd */ 331.1Scgd 341.1Scgd/* 351.1Scgd * clocktime structure: 361.1Scgd * 371.1Scgd * structure passed to TOY clocks when setting them. broken out this 381.1Scgd * way, so that the time_t -> field conversion can be shared. 391.1Scgd */ 401.1Scgdstruct clocktime { 411.1Scgd int year; /* year - 1900 */ 421.1Scgd int mon; /* month (1 - 12) */ 431.1Scgd int day; /* day (1 - 31) */ 441.1Scgd int hour; /* hour (0 - 23) */ 451.1Scgd int min; /* minute (0 - 59) */ 461.1Scgd int sec; /* second (0 - 59) */ 471.1Scgd int dow; /* day of week (0 - 6; 0 = Sunday) */ 481.1Scgd}; 491.1Scgd 501.1Scgd/* 511.2Scgd * clockfns structure: 521.1Scgd * 531.2Scgd * function switch used by chip-independent clock code, to access 541.2Scgd * chip-dependent routines. 551.1Scgd */ 561.2Scgdstruct clockfns { 571.2Scgd void (*cf_init) __P((struct device *)); 581.2Scgd void (*cf_get) __P((struct device *, time_t, struct clocktime *)); 591.2Scgd void (*cf_set) __P((struct device *, struct clocktime *)); 601.2Scgd}; 611.1Scgd 621.2Scgdvoid clockattach __P((struct device *, const struct clockfns *)); 63