diff options
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r-- | usr/src/uts/common/sys/conf.h | 10 | ||||
-rw-r--r-- | usr/src/uts/common/sys/debug.h | 4 | ||||
-rw-r--r-- | usr/src/uts/common/sys/dirent.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/dnlc.h | 6 | ||||
-rw-r--r-- | usr/src/uts/common/sys/file.h | 15 | ||||
-rw-r--r-- | usr/src/uts/common/sys/model.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/modhash.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/poll.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/share.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/signal.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/stream.h | 6 | ||||
-rw-r--r-- | usr/src/uts/common/sys/strsubr.h | 17 | ||||
-rw-r--r-- | usr/src/uts/common/sys/t_kuser.h | 1 |
13 files changed, 39 insertions, 32 deletions
diff --git a/usr/src/uts/common/sys/conf.h b/usr/src/uts/common/sys/conf.h index 4bf3d5c7e3..148104f83a 100644 --- a/usr/src/uts/common/sys/conf.h +++ b/usr/src/uts/common/sys/conf.h @@ -41,11 +41,11 @@ extern "C" { #endif -#define FMNAMESZ 8 /* used by struct fmodsw */ +#define FMNAMESZ 8 /* used by struct fmodsw */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * XXX Given that drivers need to include this file, @@ -53,10 +53,14 @@ extern "C" { * it legitimizes (aka provides prototypes for) * all sorts of functions that aren't in the DKI/SunDDI */ +#include <sys/types.h> #include <sys/systm.h> + +#endif /* _KERNEL || _FAKE_KERNEL */ +#ifdef _KERNEL + #include <sys/devops.h> #include <sys/model.h> -#include <sys/types.h> #include <sys/buf.h> #include <sys/cred.h> #include <sys/uio.h> diff --git a/usr/src/uts/common/sys/debug.h b/usr/src/uts/common/sys/debug.h index e4a959205a..9c91905af2 100644 --- a/usr/src/uts/common/sys/debug.h +++ b/usr/src/uts/common/sys/debug.h @@ -138,12 +138,12 @@ _NOTE(CONSTCOND) } while (0) #define __CTASSERT(x, y) \ typedef char __compile_time_assertion__ ## y [(x) ? 1 : -1] __unused -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) extern void abort_sequence_enter(char *); extern void debug_enter(char *); -#endif /* _KERNEL */ +#endif /* _KERNEL || _FAKE_KERNEL */ #if defined(DEBUG) && !defined(__sun) /* CSTYLED */ diff --git a/usr/src/uts/common/sys/dirent.h b/usr/src/uts/common/sys/dirent.h index 114fcf6e30..c079fb983a 100644 --- a/usr/src/uts/common/sys/dirent.h +++ b/usr/src/uts/common/sys/dirent.h @@ -76,7 +76,7 @@ typedef struct dirent64 { #endif /* _LARGEFILE64_SOURCE */ #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -#if defined(_KERNEL) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #define DIRENT64_RECLEN(namelen) \ ((offsetof(dirent64_t, d_name[0]) + 1 + (namelen) + 7) & ~ 7) #define DIRENT64_NAMELEN(reclen) \ diff --git a/usr/src/uts/common/sys/dnlc.h b/usr/src/uts/common/sys/dnlc.h index bf947659d0..4a5c20d6d0 100644 --- a/usr/src/uts/common/sys/dnlc.h +++ b/usr/src/uts/common/sys/dnlc.h @@ -76,7 +76,7 @@ extern "C" { * storing full names, then we are ok. The space savings are worth it. */ typedef struct ncache { - struct ncache *hash_next; /* hash chain, MUST BE FIRST */ + struct ncache *hash_next; /* hash chain, MUST BE FIRST */ struct ncache *hash_prev; struct vnode *vp; /* vnode the name refers to */ struct vnode *dp; /* vnode of parent of name */ @@ -169,7 +169,7 @@ struct nc_stats { (namlen) = Xcp - (name); \ } -#if defined(_KERNEL) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #include <sys/vfs.h> #include <sys/vnode.h> @@ -205,7 +205,7 @@ void dnlc_reduce_cache(void *); */ typedef struct dcfree { uint64_t df_handle; /* fs supplied handle */ - struct dcfree *df_next; /* link to next free entry in bucket */ + struct dcfree *df_next; /* link to next free entry in bucket */ uint_t df_len; /* length of free entry */ } dcfree_t; diff --git a/usr/src/uts/common/sys/file.h b/usr/src/uts/common/sys/file.h index eb1328f38d..b0914cfb45 100644 --- a/usr/src/uts/common/sys/file.h +++ b/usr/src/uts/common/sys/file.h @@ -119,7 +119,7 @@ typedef struct fpollinfo { #define FCLOEXEC 0x800000 /* O_CLOEXEC = 0x800000 */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * Fake flags for driver ioctl calls to inform them of the originating @@ -183,7 +183,7 @@ typedef struct fpollinfo { extern int flock(int, int); #endif -#if defined(_KERNEL) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * Routines dealing with user per-open file flags and @@ -192,15 +192,16 @@ extern int flock(int, int); struct proc; /* forward reference for function prototype */ struct vnodeops; struct vattr; +struct uf_info; extern file_t *getf(int); extern file_t *getf_gen(int, uf_entry_gen_t *); extern void releasef(int); -extern void areleasef(int, uf_info_t *); +extern void areleasef(int, struct uf_info *); #ifndef _BOOT -extern void closeall(uf_info_t *); +extern void closeall(struct uf_info *); #endif -extern void flist_fork(uf_info_t *, uf_info_t *); +extern void flist_fork(struct uf_info *, struct uf_info *); extern int closef(file_t *); extern int closeandsetf(int, file_t *); extern int ufalloc_file(int, file_t *); @@ -217,8 +218,8 @@ extern void f_setfd(int, char); extern int f_getfl(int, int *); extern int f_badfd(int, int *, int); extern int fassign(struct vnode **, int, int *); -extern void fcnt_add(uf_info_t *, int); -extern void close_exec(uf_info_t *); +extern void fcnt_add(struct uf_info *, int); +extern void close_exec(struct uf_info *); extern void clear_stale_fd(void); extern void clear_active_fd(int); extern void set_active_fd(int); diff --git a/usr/src/uts/common/sys/model.h b/usr/src/uts/common/sys/model.h index fab96bbe00..0569c086f5 100644 --- a/usr/src/uts/common/sys/model.h +++ b/usr/src/uts/common/sys/model.h @@ -37,7 +37,7 @@ extern "C" { #include <sys/isa_defs.h> -#if defined(_KERNEL) || defined(_KMEMUSER) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) || defined(_KMEMUSER) /* * These bits are used in various places to specify the data model diff --git a/usr/src/uts/common/sys/modhash.h b/usr/src/uts/common/sys/modhash.h index 68d1c4dedd..7f7103ecb9 100644 --- a/usr/src/uts/common/sys/modhash.h +++ b/usr/src/uts/common/sys/modhash.h @@ -34,7 +34,7 @@ extern "C" { #endif -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #include <sys/types.h> diff --git a/usr/src/uts/common/sys/poll.h b/usr/src/uts/common/sys/poll.h index 4434a8551a..558edbfba9 100644 --- a/usr/src/uts/common/sys/poll.h +++ b/usr/src/uts/common/sys/poll.h @@ -96,7 +96,7 @@ typedef unsigned long nfds_t; #endif /* _KERNEL */ -#if defined(_KERNEL) || defined(_KMEMUSER) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) || defined(_KMEMUSER) #include <sys/thread.h> diff --git a/usr/src/uts/common/sys/share.h b/usr/src/uts/common/sys/share.h index 4de5f5ce65..1a8aead065 100644 --- a/usr/src/uts/common/sys/share.h +++ b/usr/src/uts/common/sys/share.h @@ -63,7 +63,7 @@ struct shrlocklist { struct shrlocklist *next; }; -#if defined(_KERNEL) +#if defined(_KERNEL) || defined(_FAKE_KERNEL) struct flock64; extern int add_share(struct vnode *, struct shrlock *); diff --git a/usr/src/uts/common/sys/signal.h b/usr/src/uts/common/sys/signal.h index 1818665b45..b12dff6034 100644 --- a/usr/src/uts/common/sys/signal.h +++ b/usr/src/uts/common/sys/signal.h @@ -246,7 +246,7 @@ struct sigstack { #include <sys/ucontext.h> #endif /* defined(_XPG4_2) */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #include <sys/t_lock.h> extern const k_sigset_t nullsmask; /* a null signal mask */ diff --git a/usr/src/uts/common/sys/stream.h b/usr/src/uts/common/sys/stream.h index efcd2a9194..7488d3dee8 100644 --- a/usr/src/uts/common/sys/stream.h +++ b/usr/src/uts/common/sys/stream.h @@ -36,7 +36,7 @@ * For source compatibility */ #include <sys/isa_defs.h> -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) #include <sys/kmem.h> #include <sys/uio.h> #endif @@ -641,7 +641,7 @@ struct stroptions { #define SO_MAXBLK 0x100000 /* set maximum message block size */ #define SO_TAIL 0x200000 /* set the extra allocated space */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * Structure for rw (read/write) procedure calls. A pointer * to a struiod_t is passed as a parameter to the rwnext() call. @@ -766,7 +766,7 @@ typedef struct cmdblk { */ #define bpsize(bp) ((unsigned int)(bp->b_datap->db_lim - bp->b_datap->db_base)) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) /* * For two-byte M_ERROR messages: indication that a side does not have an error diff --git a/usr/src/uts/common/sys/strsubr.h b/usr/src/uts/common/sys/strsubr.h index 0f29dd3675..f3bc1ed407 100644 --- a/usr/src/uts/common/sys/strsubr.h +++ b/usr/src/uts/common/sys/strsubr.h @@ -40,6 +40,7 @@ */ #include <sys/stream.h> #include <sys/stropts.h> +#include <sys/vnode.h> #include <sys/kstat.h> #include <sys/uio.h> #include <sys/proc.h> @@ -115,7 +116,7 @@ extern "C" { /* * Function types for the parameterized stream head. * The msgfunc_t takes the parameters: - * msgfunc(vnode_t *vp, mblk_t *mp, strwakeup_t *wakeups, + * msgfunc(vnode_t *vp, mblk_t *mp, strwakeup_t *wakeups, * strsigset_t *firstmsgsigs, strsigset_t *allmsgsigs, * strpollset_t *pollwakeups); * It returns an optional message to be processed by the stream head. @@ -130,7 +131,7 @@ typedef short strpollset_t; typedef uintptr_t callbparams_id_t; typedef mblk_t *(*msgfunc_t)(vnode_t *, mblk_t *, strwakeup_t *, strsigset_t *, strsigset_t *, strpollset_t *); -typedef int (*errfunc_t)(vnode_t *, int, int *); +typedef int (*errfunc_t)(vnode_t *, int, int *); /* * Per stream sd_lock in putnext may be replaced by per cpu stream_putlocks @@ -276,7 +277,7 @@ typedef struct stdata { /* 0x00020000 unused */ /* 0x00040000 unused */ #define STRTOSTOP 0x00080000 /* block background writes */ -#define STRCMDWAIT 0x00100000 /* someone is doing an _I_CMD */ +#define STRCMDWAIT 0x00100000 /* someone is doing an _I_CMD */ /* 0x00200000 unused */ #define STRMOUNT 0x00400000 /* stream is mounted */ #define STRNOTATMARK 0x00800000 /* Not at mark (when empty read q) */ @@ -410,7 +411,7 @@ typedef struct stdata { * * The new way is: * - * mutex_enter(SQLOCK(sq)); + * mutex_enter(SQLOCK(sq)); * count = sq->sq_count; * SQ_PUTLOCKS_ENTER(sq); * SUM_SQ_PUTCOUNTS(sq, count); @@ -459,8 +460,8 @@ struct syncq { */ uint16_t sq_type; /* type (concurrency) of syncq */ uint16_t sq_rmqcount; /* # threads inside removeq() */ - kcondvar_t sq_wait; /* block on this sync queue */ - kcondvar_t sq_exitwait; /* waiting for thread to leave the */ + kcondvar_t sq_wait; /* block on this sync queue */ + kcondvar_t sq_exitwait; /* waiting for thread to leave the */ /* inner perimeter */ /* * Handling synchronous callbacks such as qtimeout and qbufcall @@ -1024,7 +1025,7 @@ typedef struct str_stack str_stack_t; /* * Copy modes for tty and I_STR ioctls */ -#define U_TO_K 01 /* User to Kernel */ +#define U_TO_K 01 /* User to Kernel */ #define K_TO_K 02 /* Kernel to Kernel */ /* @@ -1077,7 +1078,7 @@ typedef struct str_stack str_stack_t; #define STRUNLOCKMATES(X) mutex_exit(&((X)->sd_lock)); \ mutex_exit(&(((X)->sd_mate)->sd_lock)) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_FAKE_KERNEL) extern void strinit(void); extern int strdoioctl(struct stdata *, struct strioctl *, int, int, diff --git a/usr/src/uts/common/sys/t_kuser.h b/usr/src/uts/common/sys/t_kuser.h index 7aac9d94d2..b3c4da657c 100644 --- a/usr/src/uts/common/sys/t_kuser.h +++ b/usr/src/uts/common/sys/t_kuser.h @@ -98,6 +98,7 @@ extern int t_kconnect(TIUSER *, struct t_call *, struct t_call *); extern int t_kfree(TIUSER *, char *, int); extern int t_kgetstate(TIUSER *, int *); extern int t_kopen(struct file *, dev_t, int, TIUSER **, struct cred *); +extern int t_koptmgmt(TIUSER *, struct t_optmgmt *, struct t_optmgmt *); extern int t_krcvudata(TIUSER *, struct t_kunitdata *, int *, int *); extern int t_ksndudata(TIUSER *, struct t_kunitdata *, frtn_t *); extern int t_kspoll(TIUSER *, int, int, int *); |