8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / dispadmin / dispadmin.h
blob6c54aebaf8fe962c5230180ea6917996dd67f978
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
32 * Note that this file does not exist in the SVr4 base, but
33 * is largely derived from sys/hrtcntl.h, hence the AT&T
34 * copyright is propagated. SVr4.0 1.9
37 #pragma ident "%Z%%M% %I% %E% SMI"
40 * The following is an excerpt from <sys/hrtcntl.h>. HRT timers are not
41 * supported by SunOS (which will support the POSIX definition). Dispadmin
42 * uses the hrt routine _hrtnewres because it coincidentally does the
43 * right thing. These defines allow this routine to be locally included
44 * in dispadmin (rather than exported in libc). This should be improved in
45 * the long term.
49 * Definitions for specifying rounding mode.
52 #define HRT_TRUNC 0 /* Round results down. */
53 #define HRT_RND 1 /* Round results (rnd up if fractional */
54 /* part >= .5 otherwise round down). */
55 #define HRT_RNDUP 2 /* Always round results up. */
58 * Structure used to represent a high-resolution time-of-day
59 * or interval.
62 typedef struct hrtimer {
63 ulong_t hrt_secs; /* Seconds. */
64 long hrt_rem; /* A value less than a second. */
65 ulong_t hrt_res; /* The resolution of hrt_rem. */
66 } hrtimer_t;
69 * Functions in subr.c
71 extern void fatalerr(const char *, ...);
72 extern long hrtconvert(hrtimer_t *);
73 extern int _hrtnewres(hrtimer_t *, ulong_t, long);