102 #define FXATTR 0x4000 /* open as extended attribute */
103 #define FNOCTTY 0x0800
104 #define FRSYNC 0x8000 /* sync read operations at same level of */
105 /* integrity as specified for writes by */
106 /* FSYNC and FDSYNC flags */
107
108 #define FNODSYNC 0x10000 /* fsync pseudo flag */
109
110 #define FNOFOLLOW 0x20000 /* don't follow symlinks */
111 #define FNOLINKS 0x40000 /* don't allow multiple hard links */
112 #define FIGNORECASE 0x80000 /* request case-insensitive lookups */
113 #define FXATTRDIROPEN 0x100000 /* only opening hidden attribute directory */
114
115 /* f_flag2 (open-only) */
116
117 #define FSEARCH 0x200000 /* O_SEARCH = 0x200000 */
118 #define FEXEC 0x400000 /* O_EXEC = 0x400000 */
119
120 #define FCLOEXEC 0x800000 /* O_CLOEXEC = 0x800000 */
121
122 #ifdef _KERNEL
123
124 /*
125 * This is a flag that is set on f_flag2, but is never user-visible
126 */
127 #define FEPOLLED 0x8000
128
129 /*
130 * Fake flags for driver ioctl calls to inform them of the originating
131 * process' model. See <sys/model.h>
132 *
133 * Part of the Solaris 2.6+ DDI/DKI
134 */
135 #define FMODELS DATAMODEL_MASK /* Note: 0x0ff00000 */
136 #define FILP32 DATAMODEL_ILP32
137 #define FLP64 DATAMODEL_LP64
138 #define FNATIVE DATAMODEL_NATIVE
139
140 /*
141 * Large Files: The macro gets the offset maximum (refer to LFS API doc)
142 * corresponding to a file descriptor. We had the choice of storing
171
172 /* miscellaneous defines */
173
174 #ifndef L_SET
175 #define L_SET 0 /* for lseek */
176 #endif /* L_SET */
177
178 /*
179 * For flock(3C). These really don't belong here but for historical reasons
180 * the interface defines them to be here.
181 */
182 #define LOCK_SH 1
183 #define LOCK_EX 2
184 #define LOCK_NB 4
185 #define LOCK_UN 8
186
187 #if !defined(_STRICT_SYMBOLS)
188 extern int flock(int, int);
189 #endif
190
191 #if defined(_KERNEL)
192
193 /*
194 * Routines dealing with user per-open file flags and
195 * user open files.
196 */
197 struct proc; /* forward reference for function prototype */
198 struct vnodeops;
199 struct vattr;
200
201 extern file_t *getf(int);
202 extern void releasef(int);
203 extern void areleasef(int, uf_info_t *);
204 #ifndef _BOOT
205 extern void closeall(uf_info_t *);
206 #endif
207 extern void flist_fork(uf_info_t *, uf_info_t *);
208 extern int closef(file_t *);
209 extern int closeandsetf(int, file_t *);
210 extern int ufalloc_file(int, file_t *);
211 extern int ufalloc(int);
212 extern int ufcanalloc(struct proc *, uint_t);
213 extern int falloc(struct vnode *, int, file_t **, int *);
214 extern void finit(void);
215 extern void unfalloc(file_t *);
216 extern void setf(int, file_t *);
217 extern int f_getfd_error(int, int *);
218 extern char f_getfd(int);
219 extern int f_setfd_error(int, int);
220 extern void f_setfd(int, char);
221 extern int f_getfl(int, int *);
222 extern int f_badfd(int, int *, int);
223 extern int fassign(struct vnode **, int, int *);
224 extern void fcnt_add(uf_info_t *, int);
225 extern void close_exec(uf_info_t *);
226 extern void clear_stale_fd(void);
227 extern void clear_active_fd(int);
228 extern void free_afd(afd_t *afd);
229 extern int fgetstartvp(int, char *, struct vnode **);
230 extern int fsetattrat(int, char *, int, struct vattr *);
231 extern int fisopen(struct vnode *);
232 extern void delfpollinfo(int);
233 extern void addfpollinfo(int);
234 extern int sock_getfasync(struct vnode *);
235 extern int files_can_change_zones(void);
236 #ifdef DEBUG
237 /* The following functions are only used in ASSERT()s */
238 extern void checkwfdlist(struct vnode *, fpollinfo_t *);
239 extern void checkfpollinfo(void);
240 extern int infpollinfo(int);
241 #endif /* DEBUG */
242
243 #endif /* defined(_KERNEL) */
244
245 #ifdef __cplusplus
|
102 #define FXATTR 0x4000 /* open as extended attribute */
103 #define FNOCTTY 0x0800
104 #define FRSYNC 0x8000 /* sync read operations at same level of */
105 /* integrity as specified for writes by */
106 /* FSYNC and FDSYNC flags */
107
108 #define FNODSYNC 0x10000 /* fsync pseudo flag */
109
110 #define FNOFOLLOW 0x20000 /* don't follow symlinks */
111 #define FNOLINKS 0x40000 /* don't allow multiple hard links */
112 #define FIGNORECASE 0x80000 /* request case-insensitive lookups */
113 #define FXATTRDIROPEN 0x100000 /* only opening hidden attribute directory */
114
115 /* f_flag2 (open-only) */
116
117 #define FSEARCH 0x200000 /* O_SEARCH = 0x200000 */
118 #define FEXEC 0x400000 /* O_EXEC = 0x400000 */
119
120 #define FCLOEXEC 0x800000 /* O_CLOEXEC = 0x800000 */
121
122 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
123
124 /*
125 * This is a flag that is set on f_flag2, but is never user-visible
126 */
127 #define FEPOLLED 0x8000
128
129 /*
130 * Fake flags for driver ioctl calls to inform them of the originating
131 * process' model. See <sys/model.h>
132 *
133 * Part of the Solaris 2.6+ DDI/DKI
134 */
135 #define FMODELS DATAMODEL_MASK /* Note: 0x0ff00000 */
136 #define FILP32 DATAMODEL_ILP32
137 #define FLP64 DATAMODEL_LP64
138 #define FNATIVE DATAMODEL_NATIVE
139
140 /*
141 * Large Files: The macro gets the offset maximum (refer to LFS API doc)
142 * corresponding to a file descriptor. We had the choice of storing
171
172 /* miscellaneous defines */
173
174 #ifndef L_SET
175 #define L_SET 0 /* for lseek */
176 #endif /* L_SET */
177
178 /*
179 * For flock(3C). These really don't belong here but for historical reasons
180 * the interface defines them to be here.
181 */
182 #define LOCK_SH 1
183 #define LOCK_EX 2
184 #define LOCK_NB 4
185 #define LOCK_UN 8
186
187 #if !defined(_STRICT_SYMBOLS)
188 extern int flock(int, int);
189 #endif
190
191 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
192
193 /*
194 * Routines dealing with user per-open file flags and
195 * user open files.
196 */
197 struct proc; /* forward reference for function prototype */
198 struct vnodeops;
199 struct vattr;
200 struct uf_info;
201
202 extern file_t *getf(int);
203 extern void releasef(int);
204 extern void areleasef(int, struct uf_info *);
205 #ifndef _BOOT
206 extern void closeall(struct uf_info *);
207 #endif
208 extern void flist_fork(struct uf_info *, struct uf_info *);
209 extern int closef(file_t *);
210 extern int closeandsetf(int, file_t *);
211 extern int ufalloc_file(int, file_t *);
212 extern int ufalloc(int);
213 extern int ufcanalloc(struct proc *, uint_t);
214 extern int falloc(struct vnode *, int, file_t **, int *);
215 extern void finit(void);
216 extern void unfalloc(file_t *);
217 extern void setf(int, file_t *);
218 extern int f_getfd_error(int, int *);
219 extern char f_getfd(int);
220 extern int f_setfd_error(int, int);
221 extern void f_setfd(int, char);
222 extern int f_getfl(int, int *);
223 extern int f_badfd(int, int *, int);
224 extern int fassign(struct vnode **, int, int *);
225 extern void fcnt_add(struct uf_info *, int);
226 extern void close_exec(struct uf_info *);
227 extern void clear_stale_fd(void);
228 extern void clear_active_fd(int);
229 extern void free_afd(afd_t *afd);
230 extern int fgetstartvp(int, char *, struct vnode **);
231 extern int fsetattrat(int, char *, int, struct vattr *);
232 extern int fisopen(struct vnode *);
233 extern void delfpollinfo(int);
234 extern void addfpollinfo(int);
235 extern int sock_getfasync(struct vnode *);
236 extern int files_can_change_zones(void);
237 #ifdef DEBUG
238 /* The following functions are only used in ASSERT()s */
239 extern void checkwfdlist(struct vnode *, fpollinfo_t *);
240 extern void checkfpollinfo(void);
241 extern int infpollinfo(int);
242 #endif /* DEBUG */
243
244 #endif /* defined(_KERNEL) */
245
246 #ifdef __cplusplus
|