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.
8 *
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.
13 *
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]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 *
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32
33 #ifndef _SYS_DDI_H
34 #define _SYS_DDI_H
35
36 #include <sys/types.h>
37 #include <sys/map.h>
38 #include <sys/buf.h>
39 #include <sys/uio.h>
40 #include <sys/stream.h>
41
42 #ifdef __cplusplus
43 extern "C" {
68
69 #define TIME 1
70 #define UPROCP 2
71 #define PPGRP 3
72 #define LBOLT 4
73 #define SYSRINT 5
74 #define SYSXINT 6
75 #define SYSMINT 7
76 #define SYSRAWC 8
77 #define SYSCANC 9
78 #define SYSOUTC 10
79 #define PPID 11
80 #define PSID 12
81 #define UCRED 13
82
83 extern int drv_getparm(uint_t, void *);
84 extern int drv_setparm(uint_t, ulong_t);
85 extern void drv_usecwait(clock_t);
86 extern clock_t drv_hztousec(clock_t);
87 extern clock_t drv_usectohz(clock_t);
88 extern void delay(clock_t);
89 extern void time_to_wait(clock_t *, clock_t);
90
91 /* XXX -- should be changed to major_t */
92 /* convert external to internal major number */
93
94 extern int etoimajor(major_t);
95 /* convert internal to extern major number */
96 extern int itoemajor(major_t, int);
97 extern int drv_priv(struct cred *);
98
99 /*
100 * The following declarations take the place of macros in
101 * sysmacros.h The undefs are for any case where a driver includes
102 * sysmacros.h, even though DDI conforming drivers must not.
103 */
104 #undef getemajor
105 #undef geteminor
106 #undef getmajor
107 #undef getminor
|
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.
8 *
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.
13 *
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]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
25 *
26 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31 /* All Rights Reserved */
32
33
34 #ifndef _SYS_DDI_H
35 #define _SYS_DDI_H
36
37 #include <sys/types.h>
38 #include <sys/map.h>
39 #include <sys/buf.h>
40 #include <sys/uio.h>
41 #include <sys/stream.h>
42
43 #ifdef __cplusplus
44 extern "C" {
69
70 #define TIME 1
71 #define UPROCP 2
72 #define PPGRP 3
73 #define LBOLT 4
74 #define SYSRINT 5
75 #define SYSXINT 6
76 #define SYSMINT 7
77 #define SYSRAWC 8
78 #define SYSCANC 9
79 #define SYSOUTC 10
80 #define PPID 11
81 #define PSID 12
82 #define UCRED 13
83
84 extern int drv_getparm(uint_t, void *);
85 extern int drv_setparm(uint_t, ulong_t);
86 extern void drv_usecwait(clock_t);
87 extern clock_t drv_hztousec(clock_t);
88 extern clock_t drv_usectohz(clock_t);
89 extern clock_t drv_sectohz(clock_t);
90 extern void delay(clock_t);
91 extern void time_to_wait(clock_t *, clock_t);
92
93 /* XXX -- should be changed to major_t */
94 /* convert external to internal major number */
95
96 extern int etoimajor(major_t);
97 /* convert internal to extern major number */
98 extern int itoemajor(major_t, int);
99 extern int drv_priv(struct cred *);
100
101 /*
102 * The following declarations take the place of macros in
103 * sysmacros.h The undefs are for any case where a driver includes
104 * sysmacros.h, even though DDI conforming drivers must not.
105 */
106 #undef getemajor
107 #undef geteminor
108 #undef getmajor
109 #undef getminor
|