style(9) the structure definitions.
This commit is contained in:
parent
138bfe8027
commit
40da6b02e6
@ -31,7 +31,7 @@
|
||||
#ifndef _SYS_LOCK_TYPES_H_
|
||||
#define _SYS_LOCK_TYPES_H_
|
||||
|
||||
struct lock_object {
|
||||
struct lock_object {
|
||||
struct lock_class *lo_class;
|
||||
const char *lo_name;
|
||||
u_int lo_flags;
|
||||
|
@ -35,7 +35,7 @@
|
||||
* Sleep/spin mutex
|
||||
*/
|
||||
|
||||
struct mtx {
|
||||
struct mtx {
|
||||
struct lock_object mtx_object; /* Common lock properties. */
|
||||
volatile uintptr_t mtx_lock; /* owner (and state for sleep locks) */
|
||||
volatile u_int mtx_recurse; /* number of recursive holds */
|
||||
|
@ -184,7 +184,7 @@ struct __siginfo;
|
||||
/*
|
||||
* Signal vector "template" used in sigaction call.
|
||||
*/
|
||||
struct sigaction {
|
||||
struct sigaction {
|
||||
union {
|
||||
void (*__sa_handler) __P((int));
|
||||
void (*__sa_sigaction) __P((int, struct __siginfo *,
|
||||
@ -254,7 +254,7 @@ typedef struct sigaltstack {
|
||||
* 4.3 compatibility:
|
||||
* Signal vector "template" used in sigvec call.
|
||||
*/
|
||||
struct sigvec {
|
||||
struct sigvec {
|
||||
__sighandler_t *sv_handler; /* signal handler */
|
||||
int sv_mask; /* signal mask to apply */
|
||||
int sv_flags; /* see signal options below */
|
||||
@ -271,7 +271,7 @@ struct sigvec {
|
||||
/*
|
||||
* Structure used in sigstack call.
|
||||
*/
|
||||
struct sigstack {
|
||||
struct sigstack {
|
||||
char *ss_sp; /* signal stack pointer */
|
||||
int ss_onstack; /* current status */
|
||||
};
|
||||
|
@ -47,7 +47,7 @@
|
||||
SLIST_HEAD(callout_list, callout);
|
||||
TAILQ_HEAD(callout_tailq, callout);
|
||||
|
||||
struct callout {
|
||||
struct callout {
|
||||
union {
|
||||
SLIST_ENTRY(callout) sle;
|
||||
TAILQ_ENTRY(callout) tqe;
|
||||
@ -63,7 +63,7 @@ struct callout {
|
||||
#define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */
|
||||
#define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */
|
||||
|
||||
struct callout_handle {
|
||||
struct callout_handle {
|
||||
struct callout *callout;
|
||||
};
|
||||
|
||||
|
@ -107,8 +107,7 @@ struct cd_sub_channel_info {
|
||||
* Ioctls for the CD drive *
|
||||
\***************************************************************/
|
||||
|
||||
struct ioc_play_track
|
||||
{
|
||||
struct ioc_play_track {
|
||||
u_char start_track;
|
||||
u_char start_index;
|
||||
u_char end_track;
|
||||
@ -117,8 +116,7 @@ struct ioc_play_track
|
||||
#define CDIOCPLAYTRACKS _IOW('c',1,struct ioc_play_track)
|
||||
|
||||
|
||||
struct ioc_play_blocks
|
||||
{
|
||||
struct ioc_play_blocks {
|
||||
int blk;
|
||||
int len;
|
||||
};
|
||||
@ -166,15 +164,13 @@ struct ioc_read_toc_single_entry {
|
||||
#define CDIOREADTOCENTRY _IOWR('c',6,struct ioc_read_toc_single_entry)
|
||||
|
||||
|
||||
struct ioc_patch
|
||||
{
|
||||
struct ioc_patch {
|
||||
u_char patch[4]; /* one for each channel */
|
||||
};
|
||||
#define CDIOCSETPATCH _IOW('c',9,struct ioc_patch)
|
||||
|
||||
|
||||
struct ioc_vol
|
||||
{
|
||||
struct ioc_vol {
|
||||
u_char vol[4]; /* one for each channel */
|
||||
};
|
||||
#define CDIOCGETVOL _IOR('c',10,struct ioc_vol)
|
||||
@ -209,8 +205,7 @@ struct ioc_vol
|
||||
#define CDIOCEJECT _IO('c',24)
|
||||
|
||||
|
||||
struct ioc_play_msf
|
||||
{
|
||||
struct ioc_play_msf {
|
||||
u_char start_m;
|
||||
u_char start_s;
|
||||
u_char start_f;
|
||||
@ -230,8 +225,8 @@ struct ioc_play_msf
|
||||
#define CDIOCCLOSE _IO('c',28) /*<1>*/
|
||||
|
||||
|
||||
struct ioc_pitch /*<1>For drives that support it, this*/
|
||||
{ /*<1>call instructs the drive to play the*/
|
||||
struct ioc_pitch { /*<1>For drives that support it, this*/
|
||||
/*<1>call instructs the drive to play the*/
|
||||
short speed; /*<1>audio at a faster or slower-than-normal*/
|
||||
}; /*<1>rate. -32767 to -1 is slower, 0==normal,*/
|
||||
/*<1>and 1 to 32767 is faster. LSB bits are*/
|
||||
@ -273,8 +268,7 @@ struct ioc_capability { /*<2>*/
|
||||
|
||||
#define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/
|
||||
|
||||
struct ioc_read_audio
|
||||
{
|
||||
struct ioc_read_audio {
|
||||
u_char address_format;
|
||||
union msf_lba address;
|
||||
int nframes;
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define MAX_SLICES 32
|
||||
#define WHOLE_DISK_SLICE 1
|
||||
|
||||
struct diskslice {
|
||||
struct diskslice {
|
||||
u_long ds_offset; /* starting sector */
|
||||
u_long ds_size; /* number of sectors */
|
||||
int ds_type; /* (foreign) slice type */
|
||||
|
@ -46,7 +46,7 @@
|
||||
*/
|
||||
struct mbuf;
|
||||
|
||||
struct domain {
|
||||
struct domain {
|
||||
int dom_family; /* AF_xxx */
|
||||
char *dom_name;
|
||||
void (*dom_init) /* initialize domain data structures */
|
||||
|
@ -108,7 +108,7 @@ struct filedesc0 {
|
||||
* to the proc or pgrp so that the entire list may be revoked when the
|
||||
* process exits or the process group disappears.
|
||||
*/
|
||||
struct sigio {
|
||||
struct sigio {
|
||||
union {
|
||||
struct proc *siu_proc; /* process to receive SIGIO/SIGURG */
|
||||
struct pgrp *siu_pgrp; /* process group to receive ... */
|
||||
|
@ -38,7 +38,7 @@
|
||||
* Multiple interrupt handlers for a specific vector can be chained
|
||||
* together.
|
||||
*/
|
||||
struct intrhand {
|
||||
struct intrhand {
|
||||
driver_intr_t *ih_handler; /* Handler function. */
|
||||
void *ih_argument; /* Argument to pass to handler. */
|
||||
int ih_flags;
|
||||
@ -61,7 +61,7 @@ struct intrhand {
|
||||
* Note that this actually describes an interrupt source. There may or may
|
||||
* not be an actual kernel thread attached to a given source.
|
||||
*/
|
||||
struct ithd {
|
||||
struct ithd {
|
||||
struct mtx it_lock;
|
||||
struct proc *it_proc; /* Interrupt process. */
|
||||
LIST_ENTRY(ithd) it_list; /* All interrupt threads. */
|
||||
|
@ -51,7 +51,7 @@
|
||||
* recursion and the lock itself must explicitly allow recursion.
|
||||
*/
|
||||
|
||||
struct lock_class {
|
||||
struct lock_class {
|
||||
const char *lc_name;
|
||||
u_int lc_flags;
|
||||
};
|
||||
@ -98,7 +98,7 @@ struct lock_class {
|
||||
* recursion count of a lock. Lock instances are held in lists. Spin locks
|
||||
* are held in a per-cpu list while sleep locks are held in per-process list.
|
||||
*/
|
||||
struct lock_instance {
|
||||
struct lock_instance {
|
||||
struct lock_object *li_lock;
|
||||
const char *li_file; /* File and line of last acquire. */
|
||||
int li_line;
|
||||
@ -117,7 +117,7 @@ struct lock_instance {
|
||||
*/
|
||||
#define LOCK_NCHILDREN 3
|
||||
|
||||
struct lock_list_entry {
|
||||
struct lock_list_entry {
|
||||
struct lock_list_entry *ll_next;
|
||||
struct lock_instance ll_children[LOCK_NCHILDREN];
|
||||
u_int ll_count;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#ifndef _SYS_MSGBUF_H_
|
||||
#define _SYS_MSGBUF_H_
|
||||
|
||||
struct msgbuf {
|
||||
struct msgbuf {
|
||||
#define MSG_MAGIC 0x063062
|
||||
unsigned int msg_magic;
|
||||
unsigned int msg_size; /* size of buffer area */
|
||||
|
@ -183,7 +183,7 @@ int relookup __P((struct vnode *dvp, struct vnode **vpp,
|
||||
/*
|
||||
* Stats on usefulness of namei caches.
|
||||
*/
|
||||
struct nchstats {
|
||||
struct nchstats {
|
||||
long ncs_goodhits; /* hits that we can really use */
|
||||
long ncs_neghits; /* negative hits that we can use */
|
||||
long ncs_badhits; /* hits we must drop */
|
||||
|
@ -60,7 +60,7 @@ struct pcisel {
|
||||
u_int8_t pc_func; /* function on this device */
|
||||
};
|
||||
|
||||
struct pci_conf {
|
||||
struct pci_conf {
|
||||
struct pcisel pc_sel; /* bus+slot+function */
|
||||
u_int8_t pc_hdr; /* PCI header type */
|
||||
u_int16_t pc_subvendor; /* card vendor ID */
|
||||
@ -87,7 +87,7 @@ struct pci_match_conf {
|
||||
pci_getconf_flags flags; /* Matching expression */
|
||||
};
|
||||
|
||||
struct pci_conf_io {
|
||||
struct pci_conf_io {
|
||||
u_int32_t pat_buf_len; /* pattern buffer length */
|
||||
u_int32_t num_patterns; /* number of patterns */
|
||||
struct pci_match_conf *patterns; /* pattern buffer */
|
||||
|
@ -120,7 +120,7 @@
|
||||
#define PRI_MIN_IDLE (224)
|
||||
#define PRI_MAX_IDLE (PRI_MAX)
|
||||
|
||||
struct priority {
|
||||
struct priority {
|
||||
u_char pri_class; /* Scheduling class. */
|
||||
u_char pri_level; /* Normal priority level. */
|
||||
u_char pri_native; /* Priority before propogation. */
|
||||
|
@ -59,7 +59,7 @@
|
||||
/*
|
||||
* One structure allocated per session.
|
||||
*/
|
||||
struct session {
|
||||
struct session {
|
||||
int s_count; /* Ref cnt; pgrps in session. */
|
||||
struct proc *s_leader; /* Session leader. */
|
||||
struct vnode *s_ttyvp; /* Vnode of controlling terminal. */
|
||||
@ -72,7 +72,7 @@ struct session {
|
||||
/*
|
||||
* One structure allocated per process group.
|
||||
*/
|
||||
struct pgrp {
|
||||
struct pgrp {
|
||||
LIST_ENTRY(pgrp) pg_hash; /* Hash chain. */
|
||||
LIST_HEAD(, proc) pg_members; /* Pointer to pgrp members. */
|
||||
struct session *pg_session; /* Pointer to session. */
|
||||
@ -81,7 +81,7 @@ struct pgrp {
|
||||
int pg_jobc; /* # procs qualifying pgrp for job control */
|
||||
};
|
||||
|
||||
struct procsig {
|
||||
struct procsig {
|
||||
sigset_t ps_sigignore; /* Signals being ignored. */
|
||||
sigset_t ps_sigcatch; /* Signals being caught by user. */
|
||||
int ps_flag;
|
||||
@ -95,7 +95,7 @@ struct procsig {
|
||||
/*
|
||||
* pargs, used to hold a copy of the command line, if it had a sane length.
|
||||
*/
|
||||
struct pargs {
|
||||
struct pargs {
|
||||
u_int ar_ref; /* Reference count. */
|
||||
u_int ar_length; /* Length. */
|
||||
u_char ar_args[0]; /* Arguments. */
|
||||
@ -142,7 +142,7 @@ struct ithd;
|
||||
struct nlminfo;
|
||||
struct trapframe;
|
||||
|
||||
struct proc {
|
||||
struct proc {
|
||||
TAILQ_ENTRY(proc) p_procq; /* (j) Run/mutex queue. */
|
||||
TAILQ_ENTRY(proc) p_slpq; /* (j) Sleep queue. */
|
||||
LIST_ENTRY(proc) p_list; /* (d) List of all processes. */
|
||||
|
@ -57,7 +57,7 @@
|
||||
#define RUSAGE_SELF 0
|
||||
#define RUSAGE_CHILDREN -1
|
||||
|
||||
struct rusage {
|
||||
struct rusage {
|
||||
struct timeval ru_utime; /* user time used */
|
||||
struct timeval ru_stime; /* system time used */
|
||||
long ru_maxrss; /* max resident set size */
|
||||
|
@ -91,7 +91,7 @@ struct u_rman {
|
||||
* addresses on IA32 hardware.
|
||||
*/
|
||||
TAILQ_HEAD(resource_head, resource);
|
||||
struct resource {
|
||||
struct resource {
|
||||
TAILQ_ENTRY(resource) r_link;
|
||||
LIST_ENTRY(resource) r_sharelink;
|
||||
LIST_HEAD(, resource) *r_sharehead;
|
||||
@ -105,7 +105,7 @@ struct resource {
|
||||
struct rman *r_rm; /* resource manager from whence this came */
|
||||
};
|
||||
|
||||
struct rman {
|
||||
struct rman {
|
||||
struct resource_head rm_list;
|
||||
struct mtx *rm_mtx; /* mutex used to protect rm_list */
|
||||
TAILQ_ENTRY(rman) rm_link; /* link in list of all rmans */
|
||||
@ -123,7 +123,7 @@ int rman_fini(struct rman *rm);
|
||||
int rman_init(struct rman *rm);
|
||||
int rman_manage_region(struct rman *rm, u_long start, u_long end);
|
||||
int rman_release_resource(struct resource *r);
|
||||
struct resource *rman_reserve_resource(struct rman *rm, u_long start,
|
||||
struct resource *rman_reserve_resource(struct rman *rm, u_long start,
|
||||
u_long end, u_long count,
|
||||
u_int flags, struct device *dev);
|
||||
uint32_t rman_make_alignment_flags(uint32_t size);
|
||||
|
@ -58,7 +58,7 @@ TAILQ_HEAD(rqhead, proc);
|
||||
* Bit array which maintains the status of a run queue. When a queue is
|
||||
* non-empty the bit corresponding to the queue number will be set.
|
||||
*/
|
||||
struct rqbits {
|
||||
struct rqbits {
|
||||
rqb_word_t rqb_bits[RQB_LEN];
|
||||
};
|
||||
|
||||
@ -66,7 +66,7 @@ struct rqbits {
|
||||
* Run queue structure. Contains an array of run queues on which processes
|
||||
* are placed, and a structure to maintain the status of each queue.
|
||||
*/
|
||||
struct runq {
|
||||
struct runq {
|
||||
struct rqbits rq_status;
|
||||
struct rqhead rq_queues[RQ_NQS];
|
||||
};
|
||||
|
@ -184,7 +184,7 @@ struct __siginfo;
|
||||
/*
|
||||
* Signal vector "template" used in sigaction call.
|
||||
*/
|
||||
struct sigaction {
|
||||
struct sigaction {
|
||||
union {
|
||||
void (*__sa_handler) __P((int));
|
||||
void (*__sa_sigaction) __P((int, struct __siginfo *,
|
||||
@ -254,7 +254,7 @@ typedef struct sigaltstack {
|
||||
* 4.3 compatibility:
|
||||
* Signal vector "template" used in sigvec call.
|
||||
*/
|
||||
struct sigvec {
|
||||
struct sigvec {
|
||||
__sighandler_t *sv_handler; /* signal handler */
|
||||
int sv_mask; /* signal mask to apply */
|
||||
int sv_flags; /* see signal options below */
|
||||
@ -271,7 +271,7 @@ struct sigvec {
|
||||
/*
|
||||
* Structure used in sigstack call.
|
||||
*/
|
||||
struct sigstack {
|
||||
struct sigstack {
|
||||
char *ss_sp; /* signal stack pointer */
|
||||
int ss_onstack; /* current status */
|
||||
};
|
||||
|
@ -48,7 +48,7 @@
|
||||
* Process signal actions and state, needed only within the process
|
||||
* (not necessarily resident).
|
||||
*/
|
||||
struct sigacts {
|
||||
struct sigacts {
|
||||
sig_t ps_sigact[_SIG_MAXSIG]; /* disposition of signals */
|
||||
sigset_t ps_catchmask[_SIG_MAXSIG]; /* signals to be blocked */
|
||||
sigset_t ps_sigonstack; /* signals to take on sigstack */
|
||||
@ -70,7 +70,7 @@ typedef struct {
|
||||
union sigval si_value;
|
||||
} osiginfo_t;
|
||||
|
||||
struct osigaction {
|
||||
struct osigaction {
|
||||
union {
|
||||
void (*__sa_handler) __P((int));
|
||||
void (*__sa_sigaction) __P((int, osiginfo_t *, void *));
|
||||
|
@ -96,12 +96,12 @@ typedef _BSD_SOCKLEN_T_ socklen_t;
|
||||
/*
|
||||
* Structure used for manipulating linger option.
|
||||
*/
|
||||
struct linger {
|
||||
struct linger {
|
||||
int l_onoff; /* option on/off */
|
||||
int l_linger; /* linger time */
|
||||
};
|
||||
|
||||
struct accept_filter_arg {
|
||||
struct accept_filter_arg {
|
||||
char af_name[16];
|
||||
char af_arg[256-16];
|
||||
};
|
||||
|
@ -143,7 +143,7 @@ struct socket {
|
||||
/*
|
||||
* Externalized form of struct socket used by the sysctl(3) interface.
|
||||
*/
|
||||
struct xsocket {
|
||||
struct xsocket {
|
||||
size_t xso_len; /* length of this structure */
|
||||
struct socket *xso_so; /* makes a convenient handle sometimes */
|
||||
short so_type;
|
||||
|
@ -156,7 +156,7 @@ struct timezone {
|
||||
#define ITIMER_VIRTUAL 1
|
||||
#define ITIMER_PROF 2
|
||||
|
||||
struct itimerval {
|
||||
struct itimerval {
|
||||
struct timeval it_interval; /* timer interval */
|
||||
struct timeval it_value; /* current value */
|
||||
};
|
||||
|
@ -40,7 +40,7 @@
|
||||
/*
|
||||
* Definitions for UNIX IPC domain.
|
||||
*/
|
||||
struct sockaddr_un {
|
||||
struct sockaddr_un {
|
||||
u_char sun_len; /* sockaddr len including null */
|
||||
u_char sun_family; /* AF_UNIX */
|
||||
char sun_path[104]; /* path name (gag) */
|
||||
|
@ -68,7 +68,7 @@
|
||||
typedef u_quad_t unp_gen_t;
|
||||
LIST_HEAD(unp_head, unpcb);
|
||||
|
||||
struct unpcb {
|
||||
struct unpcb {
|
||||
LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */
|
||||
struct socket *unp_socket; /* pointer back to socket */
|
||||
struct vnode *unp_vnode; /* if associated with file */
|
||||
@ -105,7 +105,7 @@ struct unpcb {
|
||||
|
||||
/* Hack alert -- this structure depends on <sys/socketvar.h>. */
|
||||
#ifdef _SYS_SOCKETVAR_H_
|
||||
struct xunpcb {
|
||||
struct xunpcb {
|
||||
size_t xu_len; /* length of this structure */
|
||||
struct unpcb *xu_unpp; /* to help netstat, fstat */
|
||||
struct unpcb xu_unp; /* our information */
|
||||
@ -123,7 +123,7 @@ struct xunpcb {
|
||||
u_quad_t xu_alignment_hack;
|
||||
};
|
||||
|
||||
struct xunpgen {
|
||||
struct xunpgen {
|
||||
size_t xug_len;
|
||||
u_int xug_count;
|
||||
unp_gen_t xug_gen;
|
||||
|
Loading…
Reference in New Issue
Block a user