Print this page
9042 multiples of tty streams modules cause weirdness
Reviewed by: Randy Fishel <randyf@sibernet.com>
Reviewed by: Carlos Neira <cneirabustos@gmail.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
NEX-16818 Add fksmbcl development tool
NEX-17264 SMB client test tp_smbutil_013 fails after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
and: (fix ref leaks)
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/conf.h
+++ new/usr/src/uts/common/sys/conf.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
|
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 22 /* All Rights Reserved */
23 23
24 24 /*
25 25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 + * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
27 28 */
28 29
29 30 #ifndef _SYS_CONF_H
30 31 #define _SYS_CONF_H
31 32
32 33
33 34 #include <sys/feature_tests.h>
34 35
35 36 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
36 37 #include <sys/t_lock.h>
37 38 #endif
38 39
39 40 #ifdef __cplusplus
40 41 extern "C" {
41 42 #endif
42 43
43 44 #define FMNAMESZ 8 /* used by struct fmodsw */
44 45
45 46 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
46 47
47 -#ifdef _KERNEL
48 +#if defined(_KERNEL) || defined(_FAKE_KERNEL)
48 49
49 50 /*
50 51 * XXX Given that drivers need to include this file,
51 52 * <sys/systm.h> probably shouldn't be here, as
52 53 * it legitimizes (aka provides prototypes for)
53 54 * all sorts of functions that aren't in the DKI/SunDDI
54 55 */
56 +#include <sys/types.h>
55 57 #include <sys/systm.h>
58 +
59 +#endif /* _KERNEL || _FAKE_KERNEL */
60 +#ifdef _KERNEL
61 +
56 62 #include <sys/devops.h>
57 63 #include <sys/model.h>
58 -#include <sys/types.h>
59 64 #include <sys/buf.h>
60 65 #include <sys/cred.h>
61 66 #include <sys/uio.h>
62 67 #include <sys/poll.h>
63 68 #include <vm/as.h>
64 69
65 70 typedef struct fmodsw {
66 71 char f_name[FMNAMESZ + 1];
67 72 struct streamtab *f_str;
68 73 int f_flag;
69 74 } fmodsw_t;
70 75
71 76 extern struct dev_ops **devopsp;
72 77 extern int devcnt;
73 78
74 79 /*
75 80 * Return streams information for the driver specified by major number or
76 81 * NULL if device cb_ops structure is not present.
77 82 */
78 83 #define STREAMSTAB(maj) (devopsp[(maj)] == NULL ? NULL : \
79 84 (devopsp[(maj)]->devo_cb_ops == NULL ? \
80 85 NULL : \
81 86 devopsp[(maj)]->devo_cb_ops->cb_str))
82 87 #define CBFLAG(maj) (devopsp[(maj)]->devo_cb_ops->cb_flag)
83 88
84 89 extern int devi_identify(dev_info_t *);
85 90 extern int devi_probe(dev_info_t *);
86 91 extern int devi_attach(dev_info_t *, ddi_attach_cmd_t);
87 92 extern int devi_detach(dev_info_t *, ddi_detach_cmd_t);
88 93 extern int devi_reset(dev_info_t *, ddi_reset_cmd_t);
89 94 extern int devi_quiesce(dev_info_t *);
90 95
91 96 /*
92 97 * The following [cb]dev_* functions are not part of the DDI, use
93 98 * <sys/sunldi.h> defined interfaces instead.
94 99 */
95 100 extern int dev_open(dev_t *, int, int, cred_t *);
96 101 extern int dev_lopen(dev_t *, int, int, cred_t *);
97 102 extern int dev_close(dev_t, int, int, cred_t *);
98 103 extern int dev_lclose(dev_t, int, int, cred_t *);
99 104
100 105 extern int dev_to_instance(dev_t);
101 106
102 107 extern int bdev_strategy(struct buf *);
103 108 extern int bdev_print(dev_t, caddr_t);
104 109 extern int bdev_dump(dev_t, caddr_t, daddr_t, int);
105 110 extern int bdev_size(dev_t);
106 111 extern uint64_t bdev_Size(dev_t);
107 112
108 113 extern int cdev_read(dev_t, struct uio *, cred_t *);
109 114 extern int cdev_write(dev_t, struct uio *, cred_t *);
110 115 extern int cdev_size(dev_t);
111 116 extern uint64_t cdev_Size(dev_t);
112 117 extern int cdev_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
113 118 extern int cdev_devmap(dev_t dev, devmap_cookie_t dhp, offset_t off,
114 119 size_t len, size_t *maplen, uint_t model);
115 120 extern int cdev_mmap(int (*)(dev_t, off_t, int),
116 121 dev_t, off_t, int);
117 122 extern int cdev_segmap(dev_t, off_t, struct as *, caddr_t *,
118 123 off_t, uint_t, uint_t, uint_t, cred_t *);
119 124 extern int cdev_poll(dev_t, short, int, short *, struct pollhead **);
120 125 extern int cdev_prop_op(dev_t, dev_info_t *, ddi_prop_op_t,
121 126 int, char *, caddr_t, int *);
122 127
123 128 #endif /* _KERNEL */
124 129
125 130
126 131 /*
127 132 * Device flags.
128 133 *
129 134 * Bit 0 to bit 15 are reserved for kernel.
130 135 * Bit 16 to bit 31 are reserved for different machines.
131 136 */
132 137
133 138 #define D_NEW 0x00 /* new-style driver */
134 139 #define _D_OLD 0x01 /* old-style driver (obsolete) */
135 140 #define D_TAPE 0x08 /* Magtape device (no bdwrite when cooked) */
136 141
137 142 /*
138 143 * MT-safety level (in DDI portion of flags).
139 144 *
140 145 * All drivers must be MT-safe, and must advertise this by specifying D_MP.
141 146 *
142 147 * The remainder of the flags apply only to STREAMS modules and drivers.
143 148 *
144 149 * A STREAMS driver or module can optionally select inner and outer perimeters.
145 150 * The four mutually exclusive options that define the presence and scope
146 151 * of the inner perimeter are:
147 152 * D_MTPERMOD - per module single threaded.
148 153 * D_MTQPAIR - per queue-pair single threaded.
149 154 * D_MTPERQ - per queue instance single threaded.
150 155 * (none of the above) - no inner perimeter restricting concurrency
151 156 *
152 157 * The presence of the outer perimeter is declared with:
153 158 * D_MTOUTPERIM - a per-module outer perimeter. Can be combined with
154 159 * D_MTPERQ, D_MTQPAIR, and D_MP.
155 160 *
156 161 * The concurrency when entering the different STREAMS entry points can be
157 162 * modified with:
158 163 * D_MTPUTSHARED - modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
159 164 * specifying that the put procedures should not be
160 165 * single-threaded at the inner perimeter.
161 166 * _D_MTOCSHARED - EXPERIMENTAL - will be removed in a future release.
162 167 * Modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
163 168 * specifying that the open and close procedures should not be
164 169 * single-threaded at the inner perimeter.
165 170 * _D_MTCBSHARED - EXPERIMENTAL - will be removed in a future release.
166 171 * Modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
167 172 * specifying that the callback i.e qtimeout() procedures should
168 173 * not be single-threaded at the inner perimeter.
169 174 * _D_MTSVCSHARED - EXPERIMENTAL - will be removed in a future release.
170 175 * Modifier for D_MTPERMOD only. Specifies that the service
171 176 * procedure should not be single-threaded at the inner perimeter.
172 177 * However only a single instance of the service thread can run on
173 178 * any given queue.
174 179 * D_MTOCEXCL - modifier for D_MTOUTPERIM specifying that the open and
175 180 * close procedures should be single-threaded at the outer
176 181 * perimeter.
177 182 */
178 183 #define D_MTSAFE 0x0020 /* multi-threaded module or driver */
179 184 #define _D_QNEXTLESS 0x0040 /* Unused, retained for source compatibility */
180 185 #define _D_MTOCSHARED 0x0080 /* modify: open/close procedures are hot */
181 186 /* 0x100 - see below */
182 187 /* 0x200 - see below */
183 188 /* 0x400 - see below */
184 189 #define D_MTOCEXCL 0x0800 /* modify: open/close are exclusive at outer */
185 190 #define D_MTPUTSHARED 0x1000 /* modify: put procedures are hot */
186 191 #define D_MTPERQ 0x2000 /* per queue instance single-threaded */
187 192 #define D_MTQPAIR 0x4000 /* per queue-pair instance single-threaded */
188 193 #define D_MTPERMOD 0x6000 /* per module single-threaded */
189 194 #define D_MTOUTPERIM 0x8000 /* r/w outer perimeter around whole modules */
190 195 #define _D_MTCBSHARED 0x10000 /* modify : callback procedures are hot */
191 196 #define _D_MTSVCSHARED 0x20000 /* modify : service procedures are hot */
192 197
193 198 /* The inner perimeter scope bits */
194 199 #define D_MTINNER_MASK (D_MP|D_MTPERQ|D_MTQPAIR|D_MTPERMOD)
195 200
196 201 /* Inner perimeter modification bits */
197 202 #define D_MTINNER_MOD (D_MTPUTSHARED|_D_MTOCSHARED|_D_MTCBSHARED| \
198 203 _D_MTSVCSHARED)
199 204
200 205 /* Outer perimeter modification bits */
201 206 #define D_MTOUTER_MOD (D_MTOCEXCL)
202 207
203 208 /* All the MT flags */
204 209 #define D_MTSAFETY_MASK (D_MTINNER_MASK|D_MTOUTPERIM|D_MTPUTSHARED|\
205 210 D_MTINNER_MOD|D_MTOUTER_MOD)
206 211
207 212 #define D_MP D_MTSAFE /* ddi/dki approved flag */
208 213
209 214 #define D_64BIT 0x200 /* Driver supports 64-bit offsets, blk nos. */
210 215
211 216 #define D_SYNCSTR 0x400 /* Module or driver has Synchronous STREAMS */
212 217 /* extended qinit structure */
213 218
|
↓ open down ↓ |
145 lines elided |
↑ open up ↑ |
214 219 #define D_DEVMAP 0x100 /* Use devmap framework to mmap device */
215 220
216 221 #define D_HOTPLUG 0x4 /* Driver is hotplug capable */
217 222
218 223 #define D_U64BIT 0x40000 /* Driver supports unsigned 64-bit uio offset */
219 224
220 225 #define _D_DIRECT 0x80000 /* Private flag for transport modules */
221 226
222 227 #define D_OPEN_RETURNS_EINTR 0x100000 /* EINTR expected from open(9E) */
223 228
229 +#define _D_SINGLE_INSTANCE 0x200000 /* Module may only be pushed once */
230 +
224 231 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
225 232
226 233 #ifdef __cplusplus
227 234 }
228 235 #endif
229 236
230 237 #endif /* _SYS_CONF_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX