7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 /* All Rights Reserved */
23
24 /*
25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 #ifndef _SYS_CONF_H
30 #define _SYS_CONF_H
31
32
33 #include <sys/feature_tests.h>
34
35 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
36 #include <sys/t_lock.h>
37 #endif
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define FMNAMESZ 8 /* used by struct fmodsw */
44
45 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
46
47 #ifdef _KERNEL
48
49 /*
50 * XXX Given that drivers need to include this file,
51 * <sys/systm.h> probably shouldn't be here, as
52 * it legitimizes (aka provides prototypes for)
53 * all sorts of functions that aren't in the DKI/SunDDI
54 */
55 #include <sys/systm.h>
56 #include <sys/devops.h>
57 #include <sys/model.h>
58 #include <sys/types.h>
59 #include <sys/buf.h>
60 #include <sys/cred.h>
61 #include <sys/uio.h>
62 #include <sys/poll.h>
63 #include <vm/as.h>
64
65 typedef struct fmodsw {
66 char f_name[FMNAMESZ + 1];
67 struct streamtab *f_str;
68 int f_flag;
69 } fmodsw_t;
70
71 extern struct dev_ops **devopsp;
72 extern int devcnt;
73
74 /*
75 * Return streams information for the driver specified by major number or
76 * NULL if device cb_ops structure is not present.
77 */
78 #define STREAMSTAB(maj) (devopsp[(maj)] == NULL ? NULL : \
204 #define D_MTSAFETY_MASK (D_MTINNER_MASK|D_MTOUTPERIM|D_MTPUTSHARED|\
205 D_MTINNER_MOD|D_MTOUTER_MOD)
206
207 #define D_MP D_MTSAFE /* ddi/dki approved flag */
208
209 #define D_64BIT 0x200 /* Driver supports 64-bit offsets, blk nos. */
210
211 #define D_SYNCSTR 0x400 /* Module or driver has Synchronous STREAMS */
212 /* extended qinit structure */
213
214 #define D_DEVMAP 0x100 /* Use devmap framework to mmap device */
215
216 #define D_HOTPLUG 0x4 /* Driver is hotplug capable */
217
218 #define D_U64BIT 0x40000 /* Driver supports unsigned 64-bit uio offset */
219
220 #define _D_DIRECT 0x80000 /* Private flag for transport modules */
221
222 #define D_OPEN_RETURNS_EINTR 0x100000 /* EINTR expected from open(9E) */
223
224 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
225
226 #ifdef __cplusplus
227 }
228 #endif
229
230 #endif /* _SYS_CONF_H */
|
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 /* All Rights Reserved */
23
24 /*
25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
28 */
29
30 #ifndef _SYS_CONF_H
31 #define _SYS_CONF_H
32
33
34 #include <sys/feature_tests.h>
35
36 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
37 #include <sys/t_lock.h>
38 #endif
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 #define FMNAMESZ 8 /* used by struct fmodsw */
45
46 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
47
48 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
49
50 /*
51 * XXX Given that drivers need to include this file,
52 * <sys/systm.h> probably shouldn't be here, as
53 * it legitimizes (aka provides prototypes for)
54 * all sorts of functions that aren't in the DKI/SunDDI
55 */
56 #include <sys/types.h>
57 #include <sys/systm.h>
58
59 #endif /* _KERNEL || _FAKE_KERNEL */
60 #ifdef _KERNEL
61
62 #include <sys/devops.h>
63 #include <sys/model.h>
64 #include <sys/buf.h>
65 #include <sys/cred.h>
66 #include <sys/uio.h>
67 #include <sys/poll.h>
68 #include <vm/as.h>
69
70 typedef struct fmodsw {
71 char f_name[FMNAMESZ + 1];
72 struct streamtab *f_str;
73 int f_flag;
74 } fmodsw_t;
75
76 extern struct dev_ops **devopsp;
77 extern int devcnt;
78
79 /*
80 * Return streams information for the driver specified by major number or
81 * NULL if device cb_ops structure is not present.
82 */
83 #define STREAMSTAB(maj) (devopsp[(maj)] == NULL ? NULL : \
209 #define D_MTSAFETY_MASK (D_MTINNER_MASK|D_MTOUTPERIM|D_MTPUTSHARED|\
210 D_MTINNER_MOD|D_MTOUTER_MOD)
211
212 #define D_MP D_MTSAFE /* ddi/dki approved flag */
213
214 #define D_64BIT 0x200 /* Driver supports 64-bit offsets, blk nos. */
215
216 #define D_SYNCSTR 0x400 /* Module or driver has Synchronous STREAMS */
217 /* extended qinit structure */
218
219 #define D_DEVMAP 0x100 /* Use devmap framework to mmap device */
220
221 #define D_HOTPLUG 0x4 /* Driver is hotplug capable */
222
223 #define D_U64BIT 0x40000 /* Driver supports unsigned 64-bit uio offset */
224
225 #define _D_DIRECT 0x80000 /* Private flag for transport modules */
226
227 #define D_OPEN_RETURNS_EINTR 0x100000 /* EINTR expected from open(9E) */
228
229 #define _D_SINGLE_INSTANCE 0x200000 /* Module may only be pushed once */
230
231 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
232
233 #ifdef __cplusplus
234 }
235 #endif
236
237 #endif /* _SYS_CONF_H */
|