mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
This commit is contained in:
parent
b4183771fd
commit
740a1973a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60833
|
@ -86,11 +86,11 @@ ssh_cleanup(pam_handle_t *pamh, void *data, int error_status)
|
||||||
* environ at an array of one element equal to NULL).
|
* environ at an array of one element equal to NULL).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SLIST_HEAD(env_head, env_entry);
|
SLIST_HEAD(env_head, struct env_entry);
|
||||||
|
|
||||||
struct env_entry {
|
struct env_entry {
|
||||||
char *ee_env;
|
char *ee_env;
|
||||||
SLIST_ENTRY(env_entry) ee_entries;
|
SLIST_ENTRY(struct env_entry) ee_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct env {
|
typedef struct env {
|
||||||
|
|
|
@ -130,10 +130,10 @@ static CORE_ADDR cached_pthread_addr;
|
||||||
#define THREADID_TID(id) ((id) >> 17)
|
#define THREADID_TID(id) ((id) >> 17)
|
||||||
#define THREADID_PID(id) ((id) & ((1 << 17) - 1))
|
#define THREADID_PID(id) ((id) & ((1 << 17) - 1))
|
||||||
|
|
||||||
LIST_HEAD(idmaplist, idmap);
|
LIST_HEAD(idmaplist, struct idmap);
|
||||||
|
|
||||||
struct idmap {
|
struct idmap {
|
||||||
LIST_ENTRY(idmap) link;
|
LIST_ENTRY(struct idmap) link;
|
||||||
u_int64_t uniqueid;
|
u_int64_t uniqueid;
|
||||||
int tid;
|
int tid;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)mpool.h 8.2 (Berkeley) 7/14/94
|
* @(#)mpool.h 8.2 (Berkeley) 7/14/94
|
||||||
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MPOOL_H_
|
#ifndef _MPOOL_H_
|
||||||
|
@ -50,8 +51,8 @@
|
||||||
|
|
||||||
/* The BKT structures are the elements of the queues. */
|
/* The BKT structures are the elements of the queues. */
|
||||||
typedef struct _bkt {
|
typedef struct _bkt {
|
||||||
CIRCLEQ_ENTRY(_bkt) hq; /* hash queue */
|
CIRCLEQ_ENTRY(struct _bkt) hq; /* hash queue */
|
||||||
CIRCLEQ_ENTRY(_bkt) q; /* lru queue */
|
CIRCLEQ_ENTRY(struct _bkt) q; /* lru queue */
|
||||||
void *page; /* page */
|
void *page; /* page */
|
||||||
pgno_t pgno; /* page number */
|
pgno_t pgno; /* page number */
|
||||||
|
|
||||||
|
@ -61,9 +62,9 @@ typedef struct _bkt {
|
||||||
} BKT;
|
} BKT;
|
||||||
|
|
||||||
typedef struct MPOOL {
|
typedef struct MPOOL {
|
||||||
CIRCLEQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */
|
CIRCLEQ_HEAD(_lqh, struct _bkt) lqh; /* lru queue head */
|
||||||
/* hash queue array */
|
/* hash queue array */
|
||||||
CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE];
|
CIRCLEQ_HEAD(_hqh, struct _bkt) hqh[HASHSIZE];
|
||||||
pgno_t curcache; /* current number of cached pages */
|
pgno_t curcache; /* current number of cached pages */
|
||||||
pgno_t maxcache; /* max number of cached pages */
|
pgno_t maxcache; /* max number of cached pages */
|
||||||
pgno_t npages; /* number of pages in the file */
|
pgno_t npages; /* number of pages in the file */
|
||||||
|
|
|
@ -990,7 +990,7 @@ _nis_ghbyaddr(const void *addr, int addrlen, int af, int *errp)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct __res_type_list {
|
struct __res_type_list {
|
||||||
SLIST_ENTRY(__res_type_list) rtl_entry;
|
SLIST_ENTRY(struct __res_type_list) rtl_entry;
|
||||||
int rtl_type;
|
int rtl_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -187,14 +187,14 @@
|
||||||
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
||||||
*/
|
*/
|
||||||
typedef struct pq_list {
|
typedef struct pq_list {
|
||||||
TAILQ_HEAD(, pthread) pl_head; /* list of threads at this priority */
|
TAILQ_HEAD(, struct pthread) pl_head; /* list of threads at this priority */
|
||||||
TAILQ_ENTRY(pq_list) pl_link; /* link for queue of priority lists */
|
TAILQ_ENTRY(struct pq_list) pl_link; /* link for queue of priority lists */
|
||||||
int pl_prio; /* the priority of this list */
|
int pl_prio; /* the priority of this list */
|
||||||
int pl_queued; /* is this in the priority queue */
|
int pl_queued; /* is this in the priority queue */
|
||||||
} pq_list_t;
|
} pq_list_t;
|
||||||
|
|
||||||
typedef struct pq_queue {
|
typedef struct pq_queue {
|
||||||
TAILQ_HEAD(, pq_list) pq_queue; /* queue of priority lists */
|
TAILQ_HEAD(, struct pq_list) pq_queue; /* queue of priority lists */
|
||||||
pq_list_t *pq_lists; /* array of all priority lists */
|
pq_list_t *pq_lists; /* array of all priority lists */
|
||||||
int pq_size; /* number of priority lists */
|
int pq_size; /* number of priority lists */
|
||||||
} pq_queue_t;
|
} pq_queue_t;
|
||||||
|
@ -216,7 +216,7 @@ union pthread_mutex_data {
|
||||||
struct pthread_mutex {
|
struct pthread_mutex {
|
||||||
enum pthread_mutextype m_type;
|
enum pthread_mutextype m_type;
|
||||||
int m_protocol;
|
int m_protocol;
|
||||||
TAILQ_HEAD(mutex_head, pthread) m_queue;
|
TAILQ_HEAD(mutex_head, struct pthread) m_queue;
|
||||||
struct pthread *m_owner;
|
struct pthread *m_owner;
|
||||||
union pthread_mutex_data m_data;
|
union pthread_mutex_data m_data;
|
||||||
long m_flags;
|
long m_flags;
|
||||||
|
@ -239,7 +239,7 @@ struct pthread_mutex {
|
||||||
/*
|
/*
|
||||||
* Link for list of all mutexes a thread currently owns.
|
* Link for list of all mutexes a thread currently owns.
|
||||||
*/
|
*/
|
||||||
TAILQ_ENTRY(pthread_mutex) m_qe;
|
TAILQ_ENTRY(struct pthread_mutex) m_qe;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lock for accesses to this structure.
|
* Lock for accesses to this structure.
|
||||||
|
@ -279,7 +279,7 @@ enum pthread_cond_type {
|
||||||
|
|
||||||
struct pthread_cond {
|
struct pthread_cond {
|
||||||
enum pthread_cond_type c_type;
|
enum pthread_cond_type c_type;
|
||||||
TAILQ_HEAD(cond_head, pthread) c_queue;
|
TAILQ_HEAD(cond_head, struct pthread) c_queue;
|
||||||
pthread_mutex_t c_mutex;
|
pthread_mutex_t c_mutex;
|
||||||
void *c_data;
|
void *c_data;
|
||||||
long c_flags;
|
long c_flags;
|
||||||
|
@ -449,8 +449,8 @@ struct fd_table_entry {
|
||||||
* state of the lock on the file descriptor.
|
* state of the lock on the file descriptor.
|
||||||
*/
|
*/
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
TAILQ_HEAD(, pthread) r_queue; /* Read queue. */
|
TAILQ_HEAD(, struct pthread) r_queue; /* Read queue. */
|
||||||
TAILQ_HEAD(, pthread) w_queue; /* Write queue. */
|
TAILQ_HEAD(, struct pthread) w_queue; /* Write queue. */
|
||||||
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
||||||
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
||||||
char *r_fname; /* Ptr to read lock source file name */
|
char *r_fname; /* Ptr to read lock source file name */
|
||||||
|
@ -505,10 +505,10 @@ struct pthread {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
/* Queue entry for list of all threads: */
|
/* Queue entry for list of all threads: */
|
||||||
TAILQ_ENTRY(pthread) tle;
|
TAILQ_ENTRY(struct pthread) tle;
|
||||||
|
|
||||||
/* Queue entry for list of dead threads: */
|
/* Queue entry for list of dead threads: */
|
||||||
TAILQ_ENTRY(pthread) dle;
|
TAILQ_ENTRY(struct pthread) dle;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thread start routine, argument, stack pointer and thread
|
* Thread start routine, argument, stack pointer and thread
|
||||||
|
@ -625,7 +625,7 @@ struct pthread {
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Join queue head and link for waiting threads: */
|
/* Join queue head and link for waiting threads: */
|
||||||
TAILQ_HEAD(join_head, pthread) join_queue;
|
TAILQ_HEAD(join_head, struct pthread) join_queue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The current thread can belong to only one scheduling queue at
|
* The current thread can belong to only one scheduling queue at
|
||||||
|
@ -645,10 +645,10 @@ struct pthread {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Priority queue entry for this thread: */
|
/* Priority queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) pqe;
|
TAILQ_ENTRY(struct pthread) pqe;
|
||||||
|
|
||||||
/* Queue entry for this thread: */
|
/* Queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) qe;
|
TAILQ_ENTRY(struct pthread) qe;
|
||||||
|
|
||||||
/* Wait data. */
|
/* Wait data. */
|
||||||
union pthread_wait_data data;
|
union pthread_wait_data data;
|
||||||
|
@ -724,7 +724,7 @@ struct pthread {
|
||||||
/*
|
/*
|
||||||
* Queue of currently owned mutexes.
|
* Queue of currently owned mutexes.
|
||||||
*/
|
*/
|
||||||
TAILQ_HEAD(, pthread_mutex) mutexq;
|
TAILQ_HEAD(, struct pthread_mutex) mutexq;
|
||||||
|
|
||||||
void *ret;
|
void *ret;
|
||||||
const void **specific_data;
|
const void **specific_data;
|
||||||
|
@ -738,7 +738,7 @@ struct pthread {
|
||||||
|
|
||||||
/* Spare thread stack. */
|
/* Spare thread stack. */
|
||||||
struct stack {
|
struct stack {
|
||||||
SLIST_ENTRY(stack) qe; /* Queue entry for this stack. */
|
SLIST_ENTRY(struct stack) qe; /* Queue entry for this stack. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -776,7 +776,7 @@ SCLASS struct pthread * volatile _thread_single
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* List of all threads: */
|
/* List of all threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _thread_list
|
SCLASS TAILQ_HEAD(, struct pthread) _thread_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
||||||
#else
|
#else
|
||||||
|
@ -818,7 +818,7 @@ SCLASS struct timeval kern_inc_prio_time
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dead threads: */
|
/* Dead threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _dead_list
|
SCLASS TAILQ_HEAD(, struct pthread) _dead_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
||||||
#else
|
#else
|
||||||
|
@ -927,12 +927,12 @@ SCLASS sigset_t _process_sigpending;
|
||||||
* Scheduling queues:
|
* Scheduling queues:
|
||||||
*/
|
*/
|
||||||
SCLASS pq_queue_t _readyq;
|
SCLASS pq_queue_t _readyq;
|
||||||
SCLASS TAILQ_HEAD(, pthread) _waitingq;
|
SCLASS TAILQ_HEAD(, struct pthread) _waitingq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Work queue:
|
* Work queue:
|
||||||
*/
|
*/
|
||||||
SCLASS TAILQ_HEAD(, pthread) _workq;
|
SCLASS TAILQ_HEAD(, struct pthread) _workq;
|
||||||
|
|
||||||
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
||||||
SCLASS volatile int _spinblock_count
|
SCLASS volatile int _spinblock_count
|
||||||
|
@ -960,7 +960,7 @@ SCLASS pthread_switch_routine_t _sched_switch_hook
|
||||||
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
||||||
* locality.
|
* locality.
|
||||||
*/
|
*/
|
||||||
SCLASS SLIST_HEAD(, stack) _stackq;
|
SCLASS SLIST_HEAD(, struct stack) _stackq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
* reassigned to a different file by setting fp.
|
* reassigned to a different file by setting fp.
|
||||||
*/
|
*/
|
||||||
struct file_lock {
|
struct file_lock {
|
||||||
LIST_ENTRY(file_lock) entry; /* Entry if file list. */
|
LIST_ENTRY(struct file_lock) entry; /* Entry if file list. */
|
||||||
TAILQ_HEAD(lock_head, pthread)
|
TAILQ_HEAD(lock_head, struct pthread)
|
||||||
l_head; /* Head of queue for threads */
|
l_head; /* Head of queue for threads */
|
||||||
/* waiting on this lock. */
|
/* waiting on this lock. */
|
||||||
FILE *fp; /* The target file. */
|
FILE *fp; /* The target file. */
|
||||||
|
@ -90,7 +90,7 @@ struct file_lock {
|
||||||
* collisions that require a malloc and an element added to the list.
|
* collisions that require a malloc and an element added to the list.
|
||||||
*/
|
*/
|
||||||
struct static_file_lock {
|
struct static_file_lock {
|
||||||
LIST_HEAD(file_list_head, file_lock) head;
|
LIST_HEAD(file_list_head, struct file_lock) head;
|
||||||
struct file_lock fl;
|
struct file_lock fl;
|
||||||
} flh[NUM_HEADS];
|
} flh[NUM_HEADS];
|
||||||
|
|
||||||
|
|
|
@ -187,14 +187,14 @@
|
||||||
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
||||||
*/
|
*/
|
||||||
typedef struct pq_list {
|
typedef struct pq_list {
|
||||||
TAILQ_HEAD(, pthread) pl_head; /* list of threads at this priority */
|
TAILQ_HEAD(, struct pthread) pl_head; /* list of threads at this priority */
|
||||||
TAILQ_ENTRY(pq_list) pl_link; /* link for queue of priority lists */
|
TAILQ_ENTRY(struct pq_list) pl_link; /* link for queue of priority lists */
|
||||||
int pl_prio; /* the priority of this list */
|
int pl_prio; /* the priority of this list */
|
||||||
int pl_queued; /* is this in the priority queue */
|
int pl_queued; /* is this in the priority queue */
|
||||||
} pq_list_t;
|
} pq_list_t;
|
||||||
|
|
||||||
typedef struct pq_queue {
|
typedef struct pq_queue {
|
||||||
TAILQ_HEAD(, pq_list) pq_queue; /* queue of priority lists */
|
TAILQ_HEAD(, struct pq_list) pq_queue; /* queue of priority lists */
|
||||||
pq_list_t *pq_lists; /* array of all priority lists */
|
pq_list_t *pq_lists; /* array of all priority lists */
|
||||||
int pq_size; /* number of priority lists */
|
int pq_size; /* number of priority lists */
|
||||||
} pq_queue_t;
|
} pq_queue_t;
|
||||||
|
@ -216,7 +216,7 @@ union pthread_mutex_data {
|
||||||
struct pthread_mutex {
|
struct pthread_mutex {
|
||||||
enum pthread_mutextype m_type;
|
enum pthread_mutextype m_type;
|
||||||
int m_protocol;
|
int m_protocol;
|
||||||
TAILQ_HEAD(mutex_head, pthread) m_queue;
|
TAILQ_HEAD(mutex_head, struct pthread) m_queue;
|
||||||
struct pthread *m_owner;
|
struct pthread *m_owner;
|
||||||
union pthread_mutex_data m_data;
|
union pthread_mutex_data m_data;
|
||||||
long m_flags;
|
long m_flags;
|
||||||
|
@ -239,7 +239,7 @@ struct pthread_mutex {
|
||||||
/*
|
/*
|
||||||
* Link for list of all mutexes a thread currently owns.
|
* Link for list of all mutexes a thread currently owns.
|
||||||
*/
|
*/
|
||||||
TAILQ_ENTRY(pthread_mutex) m_qe;
|
TAILQ_ENTRY(struct pthread_mutex) m_qe;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lock for accesses to this structure.
|
* Lock for accesses to this structure.
|
||||||
|
@ -279,7 +279,7 @@ enum pthread_cond_type {
|
||||||
|
|
||||||
struct pthread_cond {
|
struct pthread_cond {
|
||||||
enum pthread_cond_type c_type;
|
enum pthread_cond_type c_type;
|
||||||
TAILQ_HEAD(cond_head, pthread) c_queue;
|
TAILQ_HEAD(cond_head, struct pthread) c_queue;
|
||||||
pthread_mutex_t c_mutex;
|
pthread_mutex_t c_mutex;
|
||||||
void *c_data;
|
void *c_data;
|
||||||
long c_flags;
|
long c_flags;
|
||||||
|
@ -449,8 +449,8 @@ struct fd_table_entry {
|
||||||
* state of the lock on the file descriptor.
|
* state of the lock on the file descriptor.
|
||||||
*/
|
*/
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
TAILQ_HEAD(, pthread) r_queue; /* Read queue. */
|
TAILQ_HEAD(, struct pthread) r_queue; /* Read queue. */
|
||||||
TAILQ_HEAD(, pthread) w_queue; /* Write queue. */
|
TAILQ_HEAD(, struct pthread) w_queue; /* Write queue. */
|
||||||
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
||||||
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
||||||
char *r_fname; /* Ptr to read lock source file name */
|
char *r_fname; /* Ptr to read lock source file name */
|
||||||
|
@ -505,10 +505,10 @@ struct pthread {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
/* Queue entry for list of all threads: */
|
/* Queue entry for list of all threads: */
|
||||||
TAILQ_ENTRY(pthread) tle;
|
TAILQ_ENTRY(struct pthread) tle;
|
||||||
|
|
||||||
/* Queue entry for list of dead threads: */
|
/* Queue entry for list of dead threads: */
|
||||||
TAILQ_ENTRY(pthread) dle;
|
TAILQ_ENTRY(struct pthread) dle;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thread start routine, argument, stack pointer and thread
|
* Thread start routine, argument, stack pointer and thread
|
||||||
|
@ -625,7 +625,7 @@ struct pthread {
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Join queue head and link for waiting threads: */
|
/* Join queue head and link for waiting threads: */
|
||||||
TAILQ_HEAD(join_head, pthread) join_queue;
|
TAILQ_HEAD(join_head, struct pthread) join_queue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The current thread can belong to only one scheduling queue at
|
* The current thread can belong to only one scheduling queue at
|
||||||
|
@ -645,10 +645,10 @@ struct pthread {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Priority queue entry for this thread: */
|
/* Priority queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) pqe;
|
TAILQ_ENTRY(struct pthread) pqe;
|
||||||
|
|
||||||
/* Queue entry for this thread: */
|
/* Queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) qe;
|
TAILQ_ENTRY(struct pthread) qe;
|
||||||
|
|
||||||
/* Wait data. */
|
/* Wait data. */
|
||||||
union pthread_wait_data data;
|
union pthread_wait_data data;
|
||||||
|
@ -724,7 +724,7 @@ struct pthread {
|
||||||
/*
|
/*
|
||||||
* Queue of currently owned mutexes.
|
* Queue of currently owned mutexes.
|
||||||
*/
|
*/
|
||||||
TAILQ_HEAD(, pthread_mutex) mutexq;
|
TAILQ_HEAD(, struct pthread_mutex) mutexq;
|
||||||
|
|
||||||
void *ret;
|
void *ret;
|
||||||
const void **specific_data;
|
const void **specific_data;
|
||||||
|
@ -738,7 +738,7 @@ struct pthread {
|
||||||
|
|
||||||
/* Spare thread stack. */
|
/* Spare thread stack. */
|
||||||
struct stack {
|
struct stack {
|
||||||
SLIST_ENTRY(stack) qe; /* Queue entry for this stack. */
|
SLIST_ENTRY(struct stack) qe; /* Queue entry for this stack. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -776,7 +776,7 @@ SCLASS struct pthread * volatile _thread_single
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* List of all threads: */
|
/* List of all threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _thread_list
|
SCLASS TAILQ_HEAD(, struct pthread) _thread_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
||||||
#else
|
#else
|
||||||
|
@ -818,7 +818,7 @@ SCLASS struct timeval kern_inc_prio_time
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dead threads: */
|
/* Dead threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _dead_list
|
SCLASS TAILQ_HEAD(, struct pthread) _dead_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
||||||
#else
|
#else
|
||||||
|
@ -927,12 +927,12 @@ SCLASS sigset_t _process_sigpending;
|
||||||
* Scheduling queues:
|
* Scheduling queues:
|
||||||
*/
|
*/
|
||||||
SCLASS pq_queue_t _readyq;
|
SCLASS pq_queue_t _readyq;
|
||||||
SCLASS TAILQ_HEAD(, pthread) _waitingq;
|
SCLASS TAILQ_HEAD(, struct pthread) _waitingq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Work queue:
|
* Work queue:
|
||||||
*/
|
*/
|
||||||
SCLASS TAILQ_HEAD(, pthread) _workq;
|
SCLASS TAILQ_HEAD(, struct pthread) _workq;
|
||||||
|
|
||||||
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
||||||
SCLASS volatile int _spinblock_count
|
SCLASS volatile int _spinblock_count
|
||||||
|
@ -960,7 +960,7 @@ SCLASS pthread_switch_routine_t _sched_switch_hook
|
||||||
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
||||||
* locality.
|
* locality.
|
||||||
*/
|
*/
|
||||||
SCLASS SLIST_HEAD(, stack) _stackq;
|
SCLASS SLIST_HEAD(, struct stack) _stackq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
struct rcfile *ncp_rc = NULL;
|
struct rcfile *ncp_rc = NULL;
|
||||||
|
|
||||||
SLIST_HEAD(rcfile_head, rcfile);
|
SLIST_HEAD(rcfile_head, struct rcfile);
|
||||||
static struct rcfile_head pf_head = {NULL};
|
static struct rcfile_head pf_head = {NULL};
|
||||||
|
|
||||||
int rc_merge(char *filename,struct rcfile **rcfile);
|
int rc_merge(char *filename,struct rcfile **rcfile);
|
||||||
|
@ -123,7 +123,7 @@ rc_close(struct rcfile *rcp) {
|
||||||
rc_sect_free(n);
|
rc_sect_free(n);
|
||||||
}
|
}
|
||||||
free(rcp->rf_name);
|
free(rcp->rf_name);
|
||||||
SLIST_REMOVE(&pf_head, rcp, rcfile, rf_next);
|
SLIST_REMOVE(&pf_head, rcp, struct rcfile, rf_next);
|
||||||
free(rcp);
|
free(rcp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ rc_sect_addkey(struct rcsection *rsp, char *name, char *value) {
|
||||||
void
|
void
|
||||||
rc_sect_delkey(struct rcsection *rsp, struct rckey *p) {
|
rc_sect_delkey(struct rcsection *rsp, struct rckey *p) {
|
||||||
|
|
||||||
SLIST_REMOVE(&rsp->rs_keys,p,rckey,rk_next);
|
SLIST_REMOVE(&rsp->rs_keys,p,struct rckey,rk_next);
|
||||||
rc_key_free(p);
|
rc_key_free(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,11 +86,11 @@ ssh_cleanup(pam_handle_t *pamh, void *data, int error_status)
|
||||||
* environ at an array of one element equal to NULL).
|
* environ at an array of one element equal to NULL).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SLIST_HEAD(env_head, env_entry);
|
SLIST_HEAD(env_head, struct env_entry);
|
||||||
|
|
||||||
struct env_entry {
|
struct env_entry {
|
||||||
char *ee_env;
|
char *ee_env;
|
||||||
SLIST_ENTRY(env_entry) ee_entries;
|
SLIST_ENTRY(struct env_entry) ee_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct env {
|
typedef struct env {
|
||||||
|
|
|
@ -187,14 +187,14 @@
|
||||||
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
* XXX It'd be nice if these were contained in uthread_priority_queue.[ch].
|
||||||
*/
|
*/
|
||||||
typedef struct pq_list {
|
typedef struct pq_list {
|
||||||
TAILQ_HEAD(, pthread) pl_head; /* list of threads at this priority */
|
TAILQ_HEAD(, struct pthread) pl_head; /* list of threads at this priority */
|
||||||
TAILQ_ENTRY(pq_list) pl_link; /* link for queue of priority lists */
|
TAILQ_ENTRY(struct pq_list) pl_link; /* link for queue of priority lists */
|
||||||
int pl_prio; /* the priority of this list */
|
int pl_prio; /* the priority of this list */
|
||||||
int pl_queued; /* is this in the priority queue */
|
int pl_queued; /* is this in the priority queue */
|
||||||
} pq_list_t;
|
} pq_list_t;
|
||||||
|
|
||||||
typedef struct pq_queue {
|
typedef struct pq_queue {
|
||||||
TAILQ_HEAD(, pq_list) pq_queue; /* queue of priority lists */
|
TAILQ_HEAD(, struct pq_list) pq_queue; /* queue of priority lists */
|
||||||
pq_list_t *pq_lists; /* array of all priority lists */
|
pq_list_t *pq_lists; /* array of all priority lists */
|
||||||
int pq_size; /* number of priority lists */
|
int pq_size; /* number of priority lists */
|
||||||
} pq_queue_t;
|
} pq_queue_t;
|
||||||
|
@ -216,7 +216,7 @@ union pthread_mutex_data {
|
||||||
struct pthread_mutex {
|
struct pthread_mutex {
|
||||||
enum pthread_mutextype m_type;
|
enum pthread_mutextype m_type;
|
||||||
int m_protocol;
|
int m_protocol;
|
||||||
TAILQ_HEAD(mutex_head, pthread) m_queue;
|
TAILQ_HEAD(mutex_head, struct pthread) m_queue;
|
||||||
struct pthread *m_owner;
|
struct pthread *m_owner;
|
||||||
union pthread_mutex_data m_data;
|
union pthread_mutex_data m_data;
|
||||||
long m_flags;
|
long m_flags;
|
||||||
|
@ -239,7 +239,7 @@ struct pthread_mutex {
|
||||||
/*
|
/*
|
||||||
* Link for list of all mutexes a thread currently owns.
|
* Link for list of all mutexes a thread currently owns.
|
||||||
*/
|
*/
|
||||||
TAILQ_ENTRY(pthread_mutex) m_qe;
|
TAILQ_ENTRY(struct pthread_mutex) m_qe;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lock for accesses to this structure.
|
* Lock for accesses to this structure.
|
||||||
|
@ -279,7 +279,7 @@ enum pthread_cond_type {
|
||||||
|
|
||||||
struct pthread_cond {
|
struct pthread_cond {
|
||||||
enum pthread_cond_type c_type;
|
enum pthread_cond_type c_type;
|
||||||
TAILQ_HEAD(cond_head, pthread) c_queue;
|
TAILQ_HEAD(cond_head, struct pthread) c_queue;
|
||||||
pthread_mutex_t c_mutex;
|
pthread_mutex_t c_mutex;
|
||||||
void *c_data;
|
void *c_data;
|
||||||
long c_flags;
|
long c_flags;
|
||||||
|
@ -449,8 +449,8 @@ struct fd_table_entry {
|
||||||
* state of the lock on the file descriptor.
|
* state of the lock on the file descriptor.
|
||||||
*/
|
*/
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
TAILQ_HEAD(, pthread) r_queue; /* Read queue. */
|
TAILQ_HEAD(, struct pthread) r_queue; /* Read queue. */
|
||||||
TAILQ_HEAD(, pthread) w_queue; /* Write queue. */
|
TAILQ_HEAD(, struct pthread) w_queue; /* Write queue. */
|
||||||
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
struct pthread *r_owner; /* Ptr to thread owning read lock. */
|
||||||
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
struct pthread *w_owner; /* Ptr to thread owning write lock. */
|
||||||
char *r_fname; /* Ptr to read lock source file name */
|
char *r_fname; /* Ptr to read lock source file name */
|
||||||
|
@ -505,10 +505,10 @@ struct pthread {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
/* Queue entry for list of all threads: */
|
/* Queue entry for list of all threads: */
|
||||||
TAILQ_ENTRY(pthread) tle;
|
TAILQ_ENTRY(struct pthread) tle;
|
||||||
|
|
||||||
/* Queue entry for list of dead threads: */
|
/* Queue entry for list of dead threads: */
|
||||||
TAILQ_ENTRY(pthread) dle;
|
TAILQ_ENTRY(struct pthread) dle;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thread start routine, argument, stack pointer and thread
|
* Thread start routine, argument, stack pointer and thread
|
||||||
|
@ -625,7 +625,7 @@ struct pthread {
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Join queue head and link for waiting threads: */
|
/* Join queue head and link for waiting threads: */
|
||||||
TAILQ_HEAD(join_head, pthread) join_queue;
|
TAILQ_HEAD(join_head, struct pthread) join_queue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The current thread can belong to only one scheduling queue at
|
* The current thread can belong to only one scheduling queue at
|
||||||
|
@ -645,10 +645,10 @@ struct pthread {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Priority queue entry for this thread: */
|
/* Priority queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) pqe;
|
TAILQ_ENTRY(struct pthread) pqe;
|
||||||
|
|
||||||
/* Queue entry for this thread: */
|
/* Queue entry for this thread: */
|
||||||
TAILQ_ENTRY(pthread) qe;
|
TAILQ_ENTRY(struct pthread) qe;
|
||||||
|
|
||||||
/* Wait data. */
|
/* Wait data. */
|
||||||
union pthread_wait_data data;
|
union pthread_wait_data data;
|
||||||
|
@ -724,7 +724,7 @@ struct pthread {
|
||||||
/*
|
/*
|
||||||
* Queue of currently owned mutexes.
|
* Queue of currently owned mutexes.
|
||||||
*/
|
*/
|
||||||
TAILQ_HEAD(, pthread_mutex) mutexq;
|
TAILQ_HEAD(, struct pthread_mutex) mutexq;
|
||||||
|
|
||||||
void *ret;
|
void *ret;
|
||||||
const void **specific_data;
|
const void **specific_data;
|
||||||
|
@ -738,7 +738,7 @@ struct pthread {
|
||||||
|
|
||||||
/* Spare thread stack. */
|
/* Spare thread stack. */
|
||||||
struct stack {
|
struct stack {
|
||||||
SLIST_ENTRY(stack) qe; /* Queue entry for this stack. */
|
SLIST_ENTRY(struct stack) qe; /* Queue entry for this stack. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -776,7 +776,7 @@ SCLASS struct pthread * volatile _thread_single
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* List of all threads: */
|
/* List of all threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _thread_list
|
SCLASS TAILQ_HEAD(, struct pthread) _thread_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
= TAILQ_HEAD_INITIALIZER(_thread_list);
|
||||||
#else
|
#else
|
||||||
|
@ -818,7 +818,7 @@ SCLASS struct timeval kern_inc_prio_time
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dead threads: */
|
/* Dead threads: */
|
||||||
SCLASS TAILQ_HEAD(, pthread) _dead_list
|
SCLASS TAILQ_HEAD(, struct pthread) _dead_list
|
||||||
#ifdef GLOBAL_PTHREAD_PRIVATE
|
#ifdef GLOBAL_PTHREAD_PRIVATE
|
||||||
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
= TAILQ_HEAD_INITIALIZER(_dead_list);
|
||||||
#else
|
#else
|
||||||
|
@ -927,12 +927,12 @@ SCLASS sigset_t _process_sigpending;
|
||||||
* Scheduling queues:
|
* Scheduling queues:
|
||||||
*/
|
*/
|
||||||
SCLASS pq_queue_t _readyq;
|
SCLASS pq_queue_t _readyq;
|
||||||
SCLASS TAILQ_HEAD(, pthread) _waitingq;
|
SCLASS TAILQ_HEAD(, struct pthread) _waitingq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Work queue:
|
* Work queue:
|
||||||
*/
|
*/
|
||||||
SCLASS TAILQ_HEAD(, pthread) _workq;
|
SCLASS TAILQ_HEAD(, struct pthread) _workq;
|
||||||
|
|
||||||
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
/* Tracks the number of threads blocked while waiting for a spinlock. */
|
||||||
SCLASS volatile int _spinblock_count
|
SCLASS volatile int _spinblock_count
|
||||||
|
@ -960,7 +960,7 @@ SCLASS pthread_switch_routine_t _sched_switch_hook
|
||||||
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
* thread creation time. Spare stacks are used in LIFO order to increase cache
|
||||||
* locality.
|
* locality.
|
||||||
*/
|
*/
|
||||||
SCLASS SLIST_HEAD(, stack) _stackq;
|
SCLASS SLIST_HEAD(, struct stack) _stackq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
* Base address of next unallocated default-size {stack, red zone}. Stacks are
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
|
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
|
||||||
|
*
|
||||||
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -120,12 +122,12 @@ struct arpcom {
|
||||||
struct ifnet ac_if; /* network-visible interface */
|
struct ifnet ac_if; /* network-visible interface */
|
||||||
u_int8_t ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */
|
u_int8_t ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */
|
||||||
char ac__pad[2]; /* be nice to m68k ports */
|
char ac__pad[2]; /* be nice to m68k ports */
|
||||||
LIST_HEAD(, ether_multi) ac_multiaddrs; /* list of ether multicast addrs */
|
LIST_HEAD(, struct ether_multi) ac_multiaddrs; /* list of ether multicast addrs */
|
||||||
int ac_multicnt; /* length of ac_multiaddrs list */
|
int ac_multicnt; /* length of ac_multiaddrs list */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct llinfo_arp {
|
struct llinfo_arp {
|
||||||
LIST_ENTRY(llinfo_arp) la_list;
|
LIST_ENTRY(struct llinfo_arp) la_list;
|
||||||
struct rtentry *la_rt;
|
struct rtentry *la_rt;
|
||||||
struct mbuf *la_hold; /* last packet until resolved/timeout */
|
struct mbuf *la_hold; /* last packet until resolved/timeout */
|
||||||
long la_asked; /* last time we QUERIED for this addr */
|
long la_asked; /* last time we QUERIED for this addr */
|
||||||
|
@ -179,7 +181,7 @@ struct ether_multi {
|
||||||
u_int8_t enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */
|
u_int8_t enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */
|
||||||
struct arpcom *enm_ac; /* back pointer to arpcom */
|
struct arpcom *enm_ac; /* back pointer to arpcom */
|
||||||
u_int enm_refcount; /* no. claims to this addr/range */
|
u_int enm_refcount; /* no. claims to this addr/range */
|
||||||
LIST_ENTRY(ether_multi) enm_list;
|
LIST_ENTRY(struct ether_multi) enm_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1183,7 +1183,7 @@ objlist_remove(Objlist *list, Obj_Entry *obj)
|
||||||
Objlist_Entry *elm;
|
Objlist_Entry *elm;
|
||||||
|
|
||||||
if ((elm = objlist_find(list, obj)) != NULL) {
|
if ((elm = objlist_find(list, obj)) != NULL) {
|
||||||
STAILQ_REMOVE(list, elm, Struct_Objlist_Entry, link);
|
STAILQ_REMOVE(list, elm, struct Struct_Objlist_Entry, link);
|
||||||
free(elm);
|
free(elm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,21 +54,21 @@ struct Struct_Obj_Entry;
|
||||||
|
|
||||||
/* Lists of shared objects */
|
/* Lists of shared objects */
|
||||||
typedef struct Struct_Objlist_Entry {
|
typedef struct Struct_Objlist_Entry {
|
||||||
STAILQ_ENTRY(Struct_Objlist_Entry) link;
|
STAILQ_ENTRY(struct Struct_Objlist_Entry) link;
|
||||||
struct Struct_Obj_Entry *obj;
|
struct Struct_Obj_Entry *obj;
|
||||||
} Objlist_Entry;
|
} Objlist_Entry;
|
||||||
|
|
||||||
typedef STAILQ_HEAD(Struct_Objlist, Struct_Objlist_Entry) Objlist;
|
typedef STAILQ_HEAD(Struct_Objlist, struct Struct_Objlist_Entry) Objlist;
|
||||||
|
|
||||||
/* Lists of init or fini functions */
|
/* Lists of init or fini functions */
|
||||||
typedef void (*InitFunc)(void);
|
typedef void (*InitFunc)(void);
|
||||||
|
|
||||||
typedef struct Struct_Funclist_Entry {
|
typedef struct Struct_Funclist_Entry {
|
||||||
STAILQ_ENTRY(Struct_Funclist_Entry) link;
|
STAILQ_ENTRY(struct Struct_Funclist_Entry) link;
|
||||||
InitFunc func;
|
InitFunc func;
|
||||||
} Funclist_Entry;
|
} Funclist_Entry;
|
||||||
|
|
||||||
typedef STAILQ_HEAD(Struct_Funclist, Struct_Funclist_Entry) Funclist;
|
typedef STAILQ_HEAD(Struct_Funclist, struct Struct_Funclist_Entry) Funclist;
|
||||||
|
|
||||||
/* Lists of shared object dependencies */
|
/* Lists of shared object dependencies */
|
||||||
typedef struct Struct_Needed_Entry {
|
typedef struct Struct_Needed_Entry {
|
||||||
|
|
|
@ -62,12 +62,12 @@ struct bounce_page {
|
||||||
bus_addr_t busaddr; /* Physical address */
|
bus_addr_t busaddr; /* Physical address */
|
||||||
vm_offset_t datavaddr; /* kva of client data */
|
vm_offset_t datavaddr; /* kva of client data */
|
||||||
bus_size_t datacount; /* client data count */
|
bus_size_t datacount; /* client data count */
|
||||||
STAILQ_ENTRY(bounce_page) links;
|
STAILQ_ENTRY(struct bounce_page) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
int busdma_swi_pending;
|
int busdma_swi_pending;
|
||||||
|
|
||||||
static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list;
|
static STAILQ_HEAD(bp_list, struct bounce_page) bounce_page_list;
|
||||||
static int free_bpages;
|
static int free_bpages;
|
||||||
static int reserved_bpages;
|
static int reserved_bpages;
|
||||||
static int active_bpages;
|
static int active_bpages;
|
||||||
|
@ -85,11 +85,11 @@ struct bus_dmamap {
|
||||||
bus_dmamap_callback_t *callback;
|
bus_dmamap_callback_t *callback;
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
void *sgmaphandle; /* handle into sgmap */
|
void *sgmaphandle; /* handle into sgmap */
|
||||||
STAILQ_ENTRY(bus_dmamap) links;
|
STAILQ_ENTRY(struct bus_dmamap) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
|
static STAILQ_HEAD(, struct bus_dmamap) bounce_map_waitinglist;
|
||||||
static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
|
static STAILQ_HEAD(, struct bus_dmamap) bounce_map_callbacklist;
|
||||||
static struct bus_dmamap nobounce_dmamap;
|
static struct bus_dmamap nobounce_dmamap;
|
||||||
|
|
||||||
static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
|
static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
|
||||||
|
|
|
@ -293,10 +293,10 @@ badaddr_read(addr, size, rptr)
|
||||||
|
|
||||||
#define HASHVEC(vector) ((vector) % 31)
|
#define HASHVEC(vector) ((vector) % 31)
|
||||||
|
|
||||||
LIST_HEAD(alpha_intr_list, alpha_intr);
|
LIST_HEAD(alpha_intr_list, struct alpha_intr);
|
||||||
|
|
||||||
struct alpha_intr {
|
struct alpha_intr {
|
||||||
LIST_ENTRY(alpha_intr) list; /* chain handlers in this hash bucket */
|
LIST_ENTRY(struct alpha_intr) list; /* chain handlers in this hash bucket */
|
||||||
int vector; /* vector to match */
|
int vector; /* vector to match */
|
||||||
driver_intr_t *intr; /* handler function */
|
driver_intr_t *intr; /* handler function */
|
||||||
void *arg; /* argument to handler */
|
void *arg; /* argument to handler */
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct pv_entry;
|
||||||
struct md_page {
|
struct md_page {
|
||||||
int pv_list_count;
|
int pv_list_count;
|
||||||
int pv_flags;
|
int pv_flags;
|
||||||
TAILQ_HEAD(,pv_entry) pv_list;
|
TAILQ_HEAD(, struct pv_entry) pv_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PV_TABLE_MOD 0x01 /* modified */
|
#define PV_TABLE_MOD 0x01 /* modified */
|
||||||
|
@ -171,7 +171,7 @@ struct md_page {
|
||||||
struct pmap {
|
struct pmap {
|
||||||
pt_entry_t *pm_lev1; /* KVA of lev0map */
|
pt_entry_t *pm_lev1; /* KVA of lev0map */
|
||||||
vm_object_t pm_pteobj; /* Container for pte's */
|
vm_object_t pm_pteobj; /* Container for pte's */
|
||||||
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
|
TAILQ_HEAD(, struct pv_entry) pm_pvlist;/* list of mappings in pmap */
|
||||||
int pm_count; /* reference count */
|
int pm_count; /* reference count */
|
||||||
int pm_flags; /* pmap flags */
|
int pm_flags; /* pmap flags */
|
||||||
int pm_active; /* active flag */
|
int pm_active; /* active flag */
|
||||||
|
@ -199,8 +199,8 @@ extern pmap_t kernel_pmap;
|
||||||
typedef struct pv_entry {
|
typedef struct pv_entry {
|
||||||
pmap_t pv_pmap; /* pmap where mapping lies */
|
pmap_t pv_pmap; /* pmap where mapping lies */
|
||||||
vm_offset_t pv_va; /* virtual address for mapping */
|
vm_offset_t pv_va; /* virtual address for mapping */
|
||||||
TAILQ_ENTRY(pv_entry) pv_list;
|
TAILQ_ENTRY(struct pv_entry) pv_list;
|
||||||
TAILQ_ENTRY(pv_entry) pv_plist;
|
TAILQ_ENTRY(struct pv_entry) pv_plist;
|
||||||
vm_page_t pv_ptem; /* VM page for pte */
|
vm_page_t pv_ptem; /* VM page for pte */
|
||||||
} *pv_entry_t;
|
} *pv_entry_t;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* occasionally xs->retries.
|
* occasionally xs->retries.
|
||||||
*/
|
*/
|
||||||
struct ecb {
|
struct ecb {
|
||||||
TAILQ_ENTRY(ecb) chain;
|
TAILQ_ENTRY(struct ecb) chain;
|
||||||
struct scsi_xfer *xs; /* SCSI xfer ctrl block from above */
|
struct scsi_xfer *xs; /* SCSI xfer ctrl block from above */
|
||||||
int flags; /* Status */
|
int flags; /* Status */
|
||||||
#define ECB_QNONE 0
|
#define ECB_QNONE 0
|
||||||
|
@ -173,7 +173,7 @@ struct esp_softc {
|
||||||
u_char sc_espfflags;
|
u_char sc_espfflags;
|
||||||
|
|
||||||
/* Lists of command blocks */
|
/* Lists of command blocks */
|
||||||
TAILQ_HEAD(ecb_list, ecb) free_list,
|
TAILQ_HEAD(ecb_list, struct ecb) free_list,
|
||||||
ready_list,
|
ready_list,
|
||||||
nexus_list;
|
nexus_list;
|
||||||
|
|
||||||
|
|
|
@ -61,12 +61,12 @@ struct bounce_page {
|
||||||
bus_addr_t busaddr; /* Physical address */
|
bus_addr_t busaddr; /* Physical address */
|
||||||
vm_offset_t datavaddr; /* kva of client data */
|
vm_offset_t datavaddr; /* kva of client data */
|
||||||
bus_size_t datacount; /* client data count */
|
bus_size_t datacount; /* client data count */
|
||||||
STAILQ_ENTRY(bounce_page) links;
|
STAILQ_ENTRY(struct bounce_page) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
int busdma_swi_pending;
|
int busdma_swi_pending;
|
||||||
|
|
||||||
static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list;
|
static STAILQ_HEAD(bp_list, struct bounce_page) bounce_page_list;
|
||||||
static int free_bpages;
|
static int free_bpages;
|
||||||
static int reserved_bpages;
|
static int reserved_bpages;
|
||||||
static int active_bpages;
|
static int active_bpages;
|
||||||
|
@ -82,11 +82,11 @@ struct bus_dmamap {
|
||||||
bus_size_t buflen; /* unmapped buffer length */
|
bus_size_t buflen; /* unmapped buffer length */
|
||||||
bus_dmamap_callback_t *callback;
|
bus_dmamap_callback_t *callback;
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
STAILQ_ENTRY(bus_dmamap) links;
|
STAILQ_ENTRY(struct bus_dmamap) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
|
static STAILQ_HEAD(, struct bus_dmamap) bounce_map_waitinglist;
|
||||||
static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
|
static STAILQ_HEAD(, struct bus_dmamap) bounce_map_callbacklist;
|
||||||
static struct bus_dmamap nobounce_dmamap;
|
static struct bus_dmamap nobounce_dmamap;
|
||||||
|
|
||||||
static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
|
static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages);
|
||||||
|
|
|
@ -191,13 +191,13 @@ struct pv_entry;
|
||||||
|
|
||||||
struct md_page {
|
struct md_page {
|
||||||
int pv_list_count;
|
int pv_list_count;
|
||||||
TAILQ_HEAD(,pv_entry) pv_list;
|
TAILQ_HEAD(,struct pv_entry) pv_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pmap {
|
struct pmap {
|
||||||
pd_entry_t *pm_pdir; /* KVA of page directory */
|
pd_entry_t *pm_pdir; /* KVA of page directory */
|
||||||
vm_object_t pm_pteobj; /* Container for pte's */
|
vm_object_t pm_pteobj; /* Container for pte's */
|
||||||
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
|
TAILQ_HEAD(,struct pv_entry) pm_pvlist;/* list of mappings in pmap */
|
||||||
int pm_count; /* reference count */
|
int pm_count; /* reference count */
|
||||||
int pm_active; /* active on cpus */
|
int pm_active; /* active on cpus */
|
||||||
struct pmap_statistics pm_stats; /* pmap statistics */
|
struct pmap_statistics pm_stats; /* pmap statistics */
|
||||||
|
@ -219,8 +219,8 @@ extern pmap_t kernel_pmap;
|
||||||
typedef struct pv_entry {
|
typedef struct pv_entry {
|
||||||
pmap_t pv_pmap; /* pmap where mapping lies */
|
pmap_t pv_pmap; /* pmap where mapping lies */
|
||||||
vm_offset_t pv_va; /* virtual address for mapping */
|
vm_offset_t pv_va; /* virtual address for mapping */
|
||||||
TAILQ_ENTRY(pv_entry) pv_list;
|
TAILQ_ENTRY(struct pv_entry) pv_list;
|
||||||
TAILQ_ENTRY(pv_entry) pv_plist;
|
TAILQ_ENTRY(struct pv_entry) pv_plist;
|
||||||
vm_page_t pv_ptem; /* VM page for pte */
|
vm_page_t pv_ptem; /* VM page for pte */
|
||||||
} *pv_entry_t;
|
} *pv_entry_t;
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ struct pnphandler
|
||||||
struct pnpident
|
struct pnpident
|
||||||
{
|
{
|
||||||
char *id_ident; /* ASCII identifier, actual format varies with bus/handler */
|
char *id_ident; /* ASCII identifier, actual format varies with bus/handler */
|
||||||
STAILQ_ENTRY(pnpident) id_link;
|
STAILQ_ENTRY(struct pnpident) id_link;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pnpinfo
|
struct pnpinfo
|
||||||
|
@ -133,8 +133,8 @@ struct pnpinfo
|
||||||
int pi_argc; /* module arguments */
|
int pi_argc; /* module arguments */
|
||||||
char **pi_argv;
|
char **pi_argv;
|
||||||
struct pnphandler *pi_handler; /* handler which detected this device */
|
struct pnphandler *pi_handler; /* handler which detected this device */
|
||||||
STAILQ_HEAD(,pnpident) pi_ident; /* list of identifiers */
|
STAILQ_HEAD(, struct pnpident) pi_ident; /* list of identifiers */
|
||||||
STAILQ_ENTRY(pnpinfo) pi_link;
|
STAILQ_ENTRY(struct pnpinfo) pi_link;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct pnphandler *pnphandlers[]; /* provided by MD code */
|
extern struct pnphandler *pnphandlers[]; /* provided by MD code */
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <bootstrap.h>
|
#include <bootstrap.h>
|
||||||
|
|
||||||
STAILQ_HEAD(,pnpinfo) pnp_devices;
|
STAILQ_HEAD(, struct pnpinfo) pnp_devices;
|
||||||
static int pnp_devices_initted = 0;
|
static int pnp_devices_initted = 0;
|
||||||
|
|
||||||
static void pnp_discard(void);
|
static void pnp_discard(void);
|
||||||
|
|
|
@ -202,10 +202,10 @@ typedef enum {
|
||||||
#define XPT_FC_IS_QUEUED(ccb) \
|
#define XPT_FC_IS_QUEUED(ccb) \
|
||||||
(((ccb)->ccb_h.func_code & XPT_FC_QUEUED) != 0)
|
(((ccb)->ccb_h.func_code & XPT_FC_QUEUED) != 0)
|
||||||
typedef union {
|
typedef union {
|
||||||
LIST_ENTRY(ccb_hdr) le;
|
LIST_ENTRY(struct ccb_hdr) le;
|
||||||
SLIST_ENTRY(ccb_hdr) sle;
|
SLIST_ENTRY(struct ccb_hdr) sle;
|
||||||
TAILQ_ENTRY(ccb_hdr) tqe;
|
TAILQ_ENTRY(struct ccb_hdr) tqe;
|
||||||
STAILQ_ENTRY(ccb_hdr) stqe;
|
STAILQ_ENTRY(struct ccb_hdr) stqe;
|
||||||
} camq_entry;
|
} camq_entry;
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
|
|
|
@ -49,7 +49,7 @@ typedef periph_init_t *periph_init_func_t;
|
||||||
struct periph_driver {
|
struct periph_driver {
|
||||||
periph_init_func_t init;
|
periph_init_func_t init;
|
||||||
char *driver_name;
|
char *driver_name;
|
||||||
TAILQ_HEAD(,cam_periph) units;
|
TAILQ_HEAD(, struct cam_periph) units;
|
||||||
u_int generation;
|
u_int generation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,9 +89,9 @@ struct cam_periph {
|
||||||
#define CAM_PERIPH_RECOVERY_INPROG 0x20
|
#define CAM_PERIPH_RECOVERY_INPROG 0x20
|
||||||
u_int32_t immediate_priority;
|
u_int32_t immediate_priority;
|
||||||
u_int32_t refcount;
|
u_int32_t refcount;
|
||||||
SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */
|
SLIST_HEAD(, struct ccb_hdr) ccb_list; /* For "immediate" requests */
|
||||||
SLIST_ENTRY(cam_periph) periph_links;
|
SLIST_ENTRY(struct cam_periph) periph_links;
|
||||||
TAILQ_ENTRY(cam_periph) unit_links;
|
TAILQ_ENTRY(struct cam_periph) unit_links;
|
||||||
ac_callback_t *deferred_callback;
|
ac_callback_t *deferred_callback;
|
||||||
ac_code deferred_ac;
|
ac_code deferred_ac;
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,9 +50,9 @@ struct camq {
|
||||||
u_int32_t qfrozen_cnt;
|
u_int32_t qfrozen_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
TAILQ_HEAD(ccb_hdr_tailq, ccb_hdr);
|
TAILQ_HEAD(ccb_hdr_tailq, struct ccb_hdr);
|
||||||
LIST_HEAD(ccb_hdr_list, ccb_hdr);
|
LIST_HEAD(ccb_hdr_list, struct ccb_hdr);
|
||||||
SLIST_HEAD(ccb_hdr_slist, ccb_hdr);
|
SLIST_HEAD(ccb_hdr_slist, struct ccb_hdr);
|
||||||
|
|
||||||
struct cam_ccbq {
|
struct cam_ccbq {
|
||||||
struct camq queue;
|
struct camq queue;
|
||||||
|
|
|
@ -69,16 +69,16 @@
|
||||||
* SIMs and peripherals to the async callback lists.
|
* SIMs and peripherals to the async callback lists.
|
||||||
*/
|
*/
|
||||||
struct async_node {
|
struct async_node {
|
||||||
SLIST_ENTRY(async_node) links;
|
SLIST_ENTRY(struct async_node) links;
|
||||||
u_int32_t event_enable; /* Async Event enables */
|
u_int32_t event_enable; /* Async Event enables */
|
||||||
void (*callback)(void *arg, u_int32_t code,
|
void (*callback)(void *arg, u_int32_t code,
|
||||||
struct cam_path *path, void *args);
|
struct cam_path *path, void *args);
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
SLIST_HEAD(async_list, async_node);
|
SLIST_HEAD(async_list, struct async_node);
|
||||||
SLIST_HEAD(periph_list, cam_periph);
|
SLIST_HEAD(periph_list, struct cam_periph);
|
||||||
static STAILQ_HEAD(highpowerlist, ccb_hdr) highpowerq;
|
static STAILQ_HEAD(highpowerlist, struct ccb_hdr) highpowerq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the maximum number of high powered commands (e.g. start unit)
|
* This is the maximum number of high powered commands (e.g. start unit)
|
||||||
|
@ -107,7 +107,7 @@ struct cam_ed_qinfo {
|
||||||
* cam_ed structure for each device on the bus.
|
* cam_ed structure for each device on the bus.
|
||||||
*/
|
*/
|
||||||
struct cam_ed {
|
struct cam_ed {
|
||||||
TAILQ_ENTRY(cam_ed) links;
|
TAILQ_ENTRY(struct cam_ed) links;
|
||||||
struct cam_ed_qinfo alloc_ccb_entry;
|
struct cam_ed_qinfo alloc_ccb_entry;
|
||||||
struct cam_ed_qinfo send_ccb_entry;
|
struct cam_ed_qinfo send_ccb_entry;
|
||||||
struct cam_et *target;
|
struct cam_et *target;
|
||||||
|
@ -155,8 +155,8 @@ struct cam_ed {
|
||||||
* of retries, or a bus rescan finds the device missing.
|
* of retries, or a bus rescan finds the device missing.
|
||||||
*/
|
*/
|
||||||
struct cam_et {
|
struct cam_et {
|
||||||
TAILQ_HEAD(, cam_ed) ed_entries;
|
TAILQ_HEAD(, struct cam_ed) ed_entries;
|
||||||
TAILQ_ENTRY(cam_et) links;
|
TAILQ_ENTRY(struct cam_et) links;
|
||||||
struct cam_eb *bus;
|
struct cam_eb *bus;
|
||||||
target_id_t target_id;
|
target_id_t target_id;
|
||||||
u_int32_t refcount;
|
u_int32_t refcount;
|
||||||
|
@ -170,8 +170,8 @@ struct cam_et {
|
||||||
* xpt_bus_deregister.
|
* xpt_bus_deregister.
|
||||||
*/
|
*/
|
||||||
struct cam_eb {
|
struct cam_eb {
|
||||||
TAILQ_HEAD(, cam_et) et_entries;
|
TAILQ_HEAD(, struct cam_et) et_entries;
|
||||||
TAILQ_ENTRY(cam_eb) links;
|
TAILQ_ENTRY(struct cam_eb) links;
|
||||||
path_id_t path_id;
|
path_id_t path_id;
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
struct timeval last_reset;
|
struct timeval last_reset;
|
||||||
|
@ -515,12 +515,12 @@ typedef int xpt_pdrvfunc_t (struct periph_driver **pdrv, void *arg);
|
||||||
static struct xpt_softc xsoftc;
|
static struct xpt_softc xsoftc;
|
||||||
|
|
||||||
/* Queues for our software interrupt handler */
|
/* Queues for our software interrupt handler */
|
||||||
typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t;
|
typedef TAILQ_HEAD(cam_isrq, struct ccb_hdr) cam_isrq_t;
|
||||||
static cam_isrq_t cam_bioq;
|
static cam_isrq_t cam_bioq;
|
||||||
static cam_isrq_t cam_netq;
|
static cam_isrq_t cam_netq;
|
||||||
|
|
||||||
/* "Pool" of inactive ccbs managed by xpt_alloc_ccb and xpt_free_ccb */
|
/* "Pool" of inactive ccbs managed by xpt_alloc_ccb and xpt_free_ccb */
|
||||||
static SLIST_HEAD(,ccb_hdr) ccb_freeq;
|
static SLIST_HEAD(, struct ccb_hdr) ccb_freeq;
|
||||||
static u_int xpt_max_ccbs; /*
|
static u_int xpt_max_ccbs; /*
|
||||||
* Maximum size of ccb pool. Modified as
|
* Maximum size of ccb pool. Modified as
|
||||||
* devices are added/removed or have their
|
* devices are added/removed or have their
|
||||||
|
@ -575,7 +575,7 @@ static struct cdevsw xpt_cdevsw = {
|
||||||
static struct intr_config_hook *xpt_config_hook;
|
static struct intr_config_hook *xpt_config_hook;
|
||||||
|
|
||||||
/* Registered busses */
|
/* Registered busses */
|
||||||
static TAILQ_HEAD(,cam_eb) xpt_busses;
|
static TAILQ_HEAD(, struct cam_eb) xpt_busses;
|
||||||
static u_int bus_generation;
|
static u_int bus_generation;
|
||||||
|
|
||||||
/* Storage for debugging datastructures */
|
/* Storage for debugging datastructures */
|
||||||
|
@ -1395,7 +1395,8 @@ xpt_remove_periph(struct cam_periph *periph)
|
||||||
|
|
||||||
device->generation++;
|
device->generation++;
|
||||||
|
|
||||||
SLIST_REMOVE(periph_head, periph, cam_periph, periph_links);
|
SLIST_REMOVE(periph_head, periph, struct cam_periph,
|
||||||
|
periph_links);
|
||||||
|
|
||||||
splx(s);
|
splx(s);
|
||||||
}
|
}
|
||||||
|
@ -3130,7 +3131,7 @@ xpt_action(union ccb *start_ccb)
|
||||||
added &= ~cur_entry->event_enable;
|
added &= ~cur_entry->event_enable;
|
||||||
if (csa->event_enable == 0) {
|
if (csa->event_enable == 0) {
|
||||||
SLIST_REMOVE(async_head, cur_entry,
|
SLIST_REMOVE(async_head, cur_entry,
|
||||||
async_node, links);
|
struct async_node, links);
|
||||||
csa->ccb_h.path->device->refcount--;
|
csa->ccb_h.path->device->refcount--;
|
||||||
free(cur_entry, M_DEVBUF);
|
free(cur_entry, M_DEVBUF);
|
||||||
} else {
|
} else {
|
||||||
|
@ -5038,7 +5039,7 @@ typedef enum {
|
||||||
} probe_flags;
|
} probe_flags;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
TAILQ_HEAD(, ccb_hdr) request_ccbs;
|
TAILQ_HEAD(, struct ccb_hdr) request_ccbs;
|
||||||
probe_action action;
|
probe_action action;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
probe_flags flags;
|
probe_flags flags;
|
||||||
|
|
|
@ -126,13 +126,13 @@ struct cd_softc {
|
||||||
cd_state state;
|
cd_state state;
|
||||||
volatile cd_flags flags;
|
volatile cd_flags flags;
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
struct cd_params params;
|
struct cd_params params;
|
||||||
struct disk disk;
|
struct disk disk;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
cd_quirks quirks;
|
cd_quirks quirks;
|
||||||
struct devstat device_stats;
|
struct devstat device_stats;
|
||||||
STAILQ_ENTRY(cd_softc) changer_links;
|
STAILQ_ENTRY(struct cd_softc) changer_links;
|
||||||
struct cdchanger *changer;
|
struct cdchanger *changer;
|
||||||
int bufs_left;
|
int bufs_left;
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
|
@ -299,11 +299,11 @@ struct cdchanger {
|
||||||
struct callout_handle short_handle;
|
struct callout_handle short_handle;
|
||||||
struct callout_handle long_handle;
|
struct callout_handle long_handle;
|
||||||
volatile cd_changer_flags flags;
|
volatile cd_changer_flags flags;
|
||||||
STAILQ_ENTRY(cdchanger) changer_links;
|
STAILQ_ENTRY(struct cdchanger) changer_links;
|
||||||
STAILQ_HEAD(chdevlist, cd_softc) chluns;
|
STAILQ_HEAD(chdevlist, struct cd_softc) chluns;
|
||||||
};
|
};
|
||||||
|
|
||||||
static STAILQ_HEAD(changerlist, cdchanger) changerq;
|
static STAILQ_HEAD(changerlist, struct cdchanger) changerq;
|
||||||
|
|
||||||
void
|
void
|
||||||
cdinit(void)
|
cdinit(void)
|
||||||
|
@ -477,7 +477,7 @@ cdcleanup(struct cam_periph *periph)
|
||||||
softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED;
|
softc->changer->flags &= ~CHANGER_SHORT_TMOUT_SCHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
STAILQ_REMOVE(&changerq, softc->changer, cdchanger,
|
STAILQ_REMOVE(&changerq, softc->changer, struct cdchanger,
|
||||||
changer_links);
|
changer_links);
|
||||||
xpt_print_path(periph->path);
|
xpt_print_path(periph->path);
|
||||||
printf("removing changer entry\n");
|
printf("removing changer entry\n");
|
||||||
|
|
|
@ -117,8 +117,8 @@ struct disk_params {
|
||||||
struct da_softc {
|
struct da_softc {
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
struct devstat device_stats;
|
struct devstat device_stats;
|
||||||
SLIST_ENTRY(da_softc) links;
|
SLIST_ENTRY(struct da_softc) links;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
da_state state;
|
da_state state;
|
||||||
da_flags flags;
|
da_flags flags;
|
||||||
da_quirks quirks;
|
da_quirks quirks;
|
||||||
|
@ -278,7 +278,7 @@ static struct cdevsw da_cdevsw = {
|
||||||
|
|
||||||
static struct cdevsw dadisk_cdevsw;
|
static struct cdevsw dadisk_cdevsw;
|
||||||
|
|
||||||
static SLIST_HEAD(,da_softc) softc_list;
|
static SLIST_HEAD(, struct da_softc) softc_list;
|
||||||
static struct extend_array *daperiphs;
|
static struct extend_array *daperiphs;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -825,7 +825,7 @@ daoninvalidate(struct cam_periph *periph)
|
||||||
}
|
}
|
||||||
splx(s);
|
splx(s);
|
||||||
|
|
||||||
SLIST_REMOVE(&softc_list, softc, da_softc, links);
|
SLIST_REMOVE(&softc_list, softc, struct da_softc, links);
|
||||||
|
|
||||||
xpt_print_path(periph->path);
|
xpt_print_path(periph->path);
|
||||||
printf("lost device\n");
|
printf("lost device\n");
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef enum {
|
||||||
struct pt_softc {
|
struct pt_softc {
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
struct devstat device_stats;
|
struct devstat device_stats;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
pt_state state;
|
pt_state state;
|
||||||
pt_flags flags;
|
pt_flags flags;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
|
|
|
@ -80,7 +80,7 @@ typedef enum {
|
||||||
/* We stick a pointer to the originating accept TIO in each continue I/O CCB */
|
/* We stick a pointer to the originating accept TIO in each continue I/O CCB */
|
||||||
#define ccb_atio ppriv_ptr1
|
#define ccb_atio ppriv_ptr1
|
||||||
|
|
||||||
TAILQ_HEAD(ccb_queue, ccb_hdr);
|
TAILQ_HEAD(ccb_queue, struct ccb_hdr);
|
||||||
|
|
||||||
struct targbh_softc {
|
struct targbh_softc {
|
||||||
struct ccb_queue pending_queue;
|
struct ccb_queue pending_queue;
|
||||||
|
|
|
@ -1763,7 +1763,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||||
frozen = (done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0;
|
frozen = (done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0;
|
||||||
if (softc->state == TARG_STATE_TEARDOWN) {
|
if (softc->state == TARG_STATE_TEARDOWN) {
|
||||||
SLIST_REMOVE(&softc->immed_notify_slist,
|
SLIST_REMOVE(&softc->immed_notify_slist,
|
||||||
&done_ccb->ccb_h, ccb_hdr,
|
&done_ccb->ccb_h, struct ccb_hdr,
|
||||||
periph_links.sle);
|
periph_links.sle);
|
||||||
free(done_ccb, M_DEVBUF);
|
free(done_ccb, M_DEVBUF);
|
||||||
} else if (done_ccb->ccb_h.status == CAM_REQ_ABORTED) {
|
} else if (done_ccb->ccb_h.status == CAM_REQ_ABORTED) {
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include <cam/cam.h>
|
#include <cam/cam.h>
|
||||||
#include <cam/cam_ccb.h>
|
#include <cam/cam_ccb.h>
|
||||||
|
|
||||||
TAILQ_HEAD(ccb_queue, ccb_hdr);
|
TAILQ_HEAD(ccb_queue, struct ccb_hdr);
|
||||||
|
|
||||||
/* Determine and clear exception state in the driver */
|
/* Determine and clear exception state in the driver */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -85,12 +85,12 @@ DATA_SET(linux_ioctl_handler_set, termio_handler);
|
||||||
|
|
||||||
struct handler_element
|
struct handler_element
|
||||||
{
|
{
|
||||||
TAILQ_ENTRY(handler_element) list;
|
TAILQ_ENTRY(struct handler_element) list;
|
||||||
int (*func)(struct proc *, struct linux_ioctl_args *);
|
int (*func)(struct proc *, struct linux_ioctl_args *);
|
||||||
int low, high, span;
|
int low, high, span;
|
||||||
};
|
};
|
||||||
|
|
||||||
static TAILQ_HEAD(, handler_element) handlers =
|
static TAILQ_HEAD(, struct handler_element) handlers =
|
||||||
TAILQ_HEAD_INITIALIZER(handlers);
|
TAILQ_HEAD_INITIALIZER(handlers);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -68,10 +68,10 @@ struct svr4_sockcache_entry {
|
||||||
struct sockaddr_un sock;/* Pathname for the socket */
|
struct sockaddr_un sock;/* Pathname for the socket */
|
||||||
udev_t dev; /* Device where the socket lives on */
|
udev_t dev; /* Device where the socket lives on */
|
||||||
ino_t ino; /* Inode where the socket lives on */
|
ino_t ino; /* Inode where the socket lives on */
|
||||||
TAILQ_ENTRY(svr4_sockcache_entry) entries;
|
TAILQ_ENTRY(struct svr4_sockcache_entry) entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
|
extern TAILQ_HEAD(svr4_sockcache_head, struct svr4_sockcache_entry) svr4_head;
|
||||||
extern int svr4_str_initialized;
|
extern int svr4_str_initialized;
|
||||||
|
|
||||||
struct sockaddr_un *
|
struct sockaddr_un *
|
||||||
|
|
|
@ -745,7 +745,7 @@ softdep_flushfiles(oldmnt, flags, p)
|
||||||
/*
|
/*
|
||||||
* Structures and routines associated with pagedep caching.
|
* Structures and routines associated with pagedep caching.
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(pagedep_hashhead, pagedep) *pagedep_hashtbl;
|
LIST_HEAD(pagedep_hashhead, struct pagedep) *pagedep_hashtbl;
|
||||||
u_long pagedep_hash; /* size of hash table - 1 */
|
u_long pagedep_hash; /* size of hash table - 1 */
|
||||||
#define PAGEDEP_HASH(mp, inum, lbn) \
|
#define PAGEDEP_HASH(mp, inum, lbn) \
|
||||||
(&pagedep_hashtbl[((((register_t)(mp)) >> 13) + (inum) + (lbn)) & \
|
(&pagedep_hashtbl[((((register_t)(mp)) >> 13) + (inum) + (lbn)) & \
|
||||||
|
@ -816,7 +816,7 @@ pagedep_lookup(ip, lbn, flags, pagedeppp)
|
||||||
/*
|
/*
|
||||||
* Structures and routines associated with inodedep caching.
|
* Structures and routines associated with inodedep caching.
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(inodedep_hashhead, inodedep) *inodedep_hashtbl;
|
LIST_HEAD(inodedep_hashhead, struct inodedep) *inodedep_hashtbl;
|
||||||
static u_long inodedep_hash; /* size of hash table - 1 */
|
static u_long inodedep_hash; /* size of hash table - 1 */
|
||||||
static long num_inodedep; /* number of inodedep allocated */
|
static long num_inodedep; /* number of inodedep allocated */
|
||||||
#define INODEDEP_HASH(fs, inum) \
|
#define INODEDEP_HASH(fs, inum) \
|
||||||
|
@ -897,7 +897,7 @@ inodedep_lookup(fs, inum, flags, inodedeppp)
|
||||||
/*
|
/*
|
||||||
* Structures and routines associated with newblk caching.
|
* Structures and routines associated with newblk caching.
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(newblk_hashhead, newblk) *newblk_hashtbl;
|
LIST_HEAD(newblk_hashhead, struct newblk) *newblk_hashtbl;
|
||||||
u_long newblk_hash; /* size of hash table - 1 */
|
u_long newblk_hash; /* size of hash table - 1 */
|
||||||
#define NEWBLK_HASH(fs, inum) \
|
#define NEWBLK_HASH(fs, inum) \
|
||||||
(&newblk_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & newblk_hash])
|
(&newblk_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & newblk_hash])
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
* per second to process the items on the queue.
|
* per second to process the items on the queue.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* LIST_HEAD(workhead, worklist); -- declared in buf.h */
|
/* LIST_HEAD(workhead, struct worklist); -- declared in buf.h */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Each request can be linked onto a work queue through its worklist structure.
|
* Each request can be linked onto a work queue through its worklist structure.
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
* and the macros below changed to use it.
|
* and the macros below changed to use it.
|
||||||
*/
|
*/
|
||||||
struct worklist {
|
struct worklist {
|
||||||
LIST_ENTRY(worklist) wk_list; /* list of work requests */
|
LIST_ENTRY(struct worklist) wk_list; /* list of work requests */
|
||||||
unsigned short wk_type; /* type of request */
|
unsigned short wk_type; /* type of request */
|
||||||
unsigned short wk_state; /* state flags */
|
unsigned short wk_state; /* state flags */
|
||||||
};
|
};
|
||||||
|
@ -160,13 +160,13 @@ struct worklist {
|
||||||
/*
|
/*
|
||||||
* Various types of lists
|
* Various types of lists
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(dirremhd, dirrem);
|
LIST_HEAD(dirremhd, struct dirrem);
|
||||||
LIST_HEAD(diraddhd, diradd);
|
LIST_HEAD(diraddhd, struct diradd);
|
||||||
LIST_HEAD(newblkhd, newblk);
|
LIST_HEAD(newblkhd, struct newblk);
|
||||||
LIST_HEAD(inodedephd, inodedep);
|
LIST_HEAD(inodedephd, struct inodedep);
|
||||||
LIST_HEAD(allocindirhd, allocindir);
|
LIST_HEAD(allocindirhd, struct allocindir);
|
||||||
LIST_HEAD(allocdirecthd, allocdirect);
|
LIST_HEAD(allocdirecthd, struct allocdirect);
|
||||||
TAILQ_HEAD(allocdirectlst, allocdirect);
|
TAILQ_HEAD(allocdirectlst, struct allocdirect);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The "pagedep" structure tracks the various dependencies related to
|
* The "pagedep" structure tracks the various dependencies related to
|
||||||
|
@ -191,7 +191,7 @@ TAILQ_HEAD(allocdirectlst, allocdirect);
|
||||||
struct pagedep {
|
struct pagedep {
|
||||||
struct worklist pd_list; /* page buffer */
|
struct worklist pd_list; /* page buffer */
|
||||||
# define pd_state pd_list.wk_state /* check for multiple I/O starts */
|
# define pd_state pd_list.wk_state /* check for multiple I/O starts */
|
||||||
LIST_ENTRY(pagedep) pd_hash; /* hashed lookup */
|
LIST_ENTRY(struct pagedep) pd_hash; /* hashed lookup */
|
||||||
struct mount *pd_mnt; /* associated mount point */
|
struct mount *pd_mnt; /* associated mount point */
|
||||||
ino_t pd_ino; /* associated file */
|
ino_t pd_ino; /* associated file */
|
||||||
ufs_lbn_t pd_lbn; /* block within file */
|
ufs_lbn_t pd_lbn; /* block within file */
|
||||||
|
@ -250,12 +250,12 @@ struct pagedep {
|
||||||
struct inodedep {
|
struct inodedep {
|
||||||
struct worklist id_list; /* buffer holding inode block */
|
struct worklist id_list; /* buffer holding inode block */
|
||||||
# define id_state id_list.wk_state /* inode dependency state */
|
# define id_state id_list.wk_state /* inode dependency state */
|
||||||
LIST_ENTRY(inodedep) id_hash; /* hashed lookup */
|
LIST_ENTRY(struct inodedep) id_hash; /* hashed lookup */
|
||||||
struct fs *id_fs; /* associated filesystem */
|
struct fs *id_fs; /* associated filesystem */
|
||||||
ino_t id_ino; /* dependent inode */
|
ino_t id_ino; /* dependent inode */
|
||||||
nlink_t id_nlinkdelta; /* saved effective link count */
|
nlink_t id_nlinkdelta; /* saved effective link count */
|
||||||
struct dinode *id_savedino; /* saved dinode contents */
|
struct dinode *id_savedino; /* saved dinode contents */
|
||||||
LIST_ENTRY(inodedep) id_deps; /* bmsafemap's list of inodedep's */
|
LIST_ENTRY(struct inodedep) id_deps; /* bmsafemap's list of inodedep's */
|
||||||
struct buf *id_buf; /* related bmsafemap (if pending) */
|
struct buf *id_buf; /* related bmsafemap (if pending) */
|
||||||
off_t id_savedsize; /* file size saved during rollback */
|
off_t id_savedsize; /* file size saved during rollback */
|
||||||
struct workhead id_pendinghd; /* entries awaiting directory write */
|
struct workhead id_pendinghd; /* entries awaiting directory write */
|
||||||
|
@ -274,11 +274,11 @@ struct inodedep {
|
||||||
* is not set (i.e., its cylinder group map has not been written).
|
* is not set (i.e., its cylinder group map has not been written).
|
||||||
*/
|
*/
|
||||||
struct newblk {
|
struct newblk {
|
||||||
LIST_ENTRY(newblk) nb_hash; /* hashed lookup */
|
LIST_ENTRY(struct newblk) nb_hash; /* hashed lookup */
|
||||||
struct fs *nb_fs; /* associated filesystem */
|
struct fs *nb_fs; /* associated filesystem */
|
||||||
ufs_daddr_t nb_newblkno; /* allocated block number */
|
ufs_daddr_t nb_newblkno; /* allocated block number */
|
||||||
int nb_state; /* state of bitmap dependency */
|
int nb_state; /* state of bitmap dependency */
|
||||||
LIST_ENTRY(newblk) nb_deps; /* bmsafemap's list of newblk's */
|
LIST_ENTRY(struct newblk) nb_deps; /* bmsafemap's list of newblk's */
|
||||||
struct bmsafemap *nb_bmsafemap; /* associated bmsafemap */
|
struct bmsafemap *nb_bmsafemap; /* associated bmsafemap */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -321,13 +321,13 @@ struct bmsafemap {
|
||||||
struct allocdirect {
|
struct allocdirect {
|
||||||
struct worklist ad_list; /* buffer holding block */
|
struct worklist ad_list; /* buffer holding block */
|
||||||
# define ad_state ad_list.wk_state /* block pointer state */
|
# define ad_state ad_list.wk_state /* block pointer state */
|
||||||
TAILQ_ENTRY(allocdirect) ad_next; /* inodedep's list of allocdirect's */
|
TAILQ_ENTRY(struct allocdirect) ad_next; /* inodedep's list of allocdirect's */
|
||||||
ufs_lbn_t ad_lbn; /* block within file */
|
ufs_lbn_t ad_lbn; /* block within file */
|
||||||
ufs_daddr_t ad_newblkno; /* new value of block pointer */
|
ufs_daddr_t ad_newblkno; /* new value of block pointer */
|
||||||
ufs_daddr_t ad_oldblkno; /* old value of block pointer */
|
ufs_daddr_t ad_oldblkno; /* old value of block pointer */
|
||||||
long ad_newsize; /* size of new block */
|
long ad_newsize; /* size of new block */
|
||||||
long ad_oldsize; /* size of old block */
|
long ad_oldsize; /* size of old block */
|
||||||
LIST_ENTRY(allocdirect) ad_deps; /* bmsafemap's list of allocdirect's */
|
LIST_ENTRY(struct allocdirect) ad_deps; /* bmsafemap's list of allocdirect's */
|
||||||
struct buf *ad_buf; /* cylgrp buffer (if pending) */
|
struct buf *ad_buf; /* cylgrp buffer (if pending) */
|
||||||
struct inodedep *ad_inodedep; /* associated inodedep */
|
struct inodedep *ad_inodedep; /* associated inodedep */
|
||||||
struct freefrag *ad_freefrag; /* fragment to be freed (if any) */
|
struct freefrag *ad_freefrag; /* fragment to be freed (if any) */
|
||||||
|
@ -375,13 +375,13 @@ struct indirdep {
|
||||||
struct allocindir {
|
struct allocindir {
|
||||||
struct worklist ai_list; /* buffer holding indirect block */
|
struct worklist ai_list; /* buffer holding indirect block */
|
||||||
# define ai_state ai_list.wk_state /* indirect block pointer state */
|
# define ai_state ai_list.wk_state /* indirect block pointer state */
|
||||||
LIST_ENTRY(allocindir) ai_next; /* indirdep's list of allocindir's */
|
LIST_ENTRY(struct allocindir) ai_next; /* indirdep's list of allocindir's */
|
||||||
int ai_offset; /* pointer offset in indirect block */
|
int ai_offset; /* pointer offset in indirect block */
|
||||||
ufs_daddr_t ai_newblkno; /* new block pointer value */
|
ufs_daddr_t ai_newblkno; /* new block pointer value */
|
||||||
ufs_daddr_t ai_oldblkno; /* old block pointer value */
|
ufs_daddr_t ai_oldblkno; /* old block pointer value */
|
||||||
struct freefrag *ai_freefrag; /* block to be freed when complete */
|
struct freefrag *ai_freefrag; /* block to be freed when complete */
|
||||||
struct indirdep *ai_indirdep; /* address of associated indirdep */
|
struct indirdep *ai_indirdep; /* address of associated indirdep */
|
||||||
LIST_ENTRY(allocindir) ai_deps; /* bmsafemap's list of allocindir's */
|
LIST_ENTRY(struct allocindir) ai_deps; /* bmsafemap's list of allocindir's */
|
||||||
struct buf *ai_buf; /* cylgrp buffer (if pending) */
|
struct buf *ai_buf; /* cylgrp buffer (if pending) */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ struct freefile {
|
||||||
struct diradd {
|
struct diradd {
|
||||||
struct worklist da_list; /* id_inowait or id_pendinghd list */
|
struct worklist da_list; /* id_inowait or id_pendinghd list */
|
||||||
# define da_state da_list.wk_state /* state of the new directory entry */
|
# define da_state da_list.wk_state /* state of the new directory entry */
|
||||||
LIST_ENTRY(diradd) da_pdlist; /* pagedep holding directory block */
|
LIST_ENTRY(struct diradd) da_pdlist; /* pagedep holding directory block */
|
||||||
doff_t da_offset; /* offset of new dir entry in dir blk */
|
doff_t da_offset; /* offset of new dir entry in dir blk */
|
||||||
ino_t da_newinum; /* inode number for the new dir entry */
|
ino_t da_newinum; /* inode number for the new dir entry */
|
||||||
union {
|
union {
|
||||||
|
@ -518,9 +518,9 @@ struct mkdir {
|
||||||
# define md_state md_list.wk_state /* type: MKDIR_PARENT or MKDIR_BODY */
|
# define md_state md_list.wk_state /* type: MKDIR_PARENT or MKDIR_BODY */
|
||||||
struct diradd *md_diradd; /* associated diradd */
|
struct diradd *md_diradd; /* associated diradd */
|
||||||
struct buf *md_buf; /* MKDIR_BODY: buffer holding dir */
|
struct buf *md_buf; /* MKDIR_BODY: buffer holding dir */
|
||||||
LIST_ENTRY(mkdir) md_mkdirs; /* list of all mkdirs */
|
LIST_ENTRY(struct mkdir) md_mkdirs; /* list of all mkdirs */
|
||||||
};
|
};
|
||||||
LIST_HEAD(mkdirlist, mkdir) mkdirlisthd;
|
LIST_HEAD(mkdirlist, struct mkdir) mkdirlisthd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A "dirrem" structure describes an operation to decrement the link
|
* A "dirrem" structure describes an operation to decrement the link
|
||||||
|
@ -536,7 +536,7 @@ LIST_HEAD(mkdirlist, mkdir) mkdirlisthd;
|
||||||
struct dirrem {
|
struct dirrem {
|
||||||
struct worklist dm_list; /* delayed worklist */
|
struct worklist dm_list; /* delayed worklist */
|
||||||
# define dm_state dm_list.wk_state /* state of the old directory entry */
|
# define dm_state dm_list.wk_state /* state of the old directory entry */
|
||||||
LIST_ENTRY(dirrem) dm_next; /* pagedep's list of dirrem's */
|
LIST_ENTRY(struct dirrem) dm_next; /* pagedep's list of dirrem's */
|
||||||
struct mount *dm_mnt; /* associated mount point */
|
struct mount *dm_mnt; /* associated mount point */
|
||||||
ino_t dm_oldinum; /* inum of the removed dir entry */
|
ino_t dm_oldinum; /* inum of the removed dir entry */
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct adv_ccb_info {
|
||||||
adv_ccb_state state;
|
adv_ccb_state state;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
union ccb* ccb;
|
union ccb* ccb;
|
||||||
SLIST_ENTRY(adv_ccb_info) links;
|
SLIST_ENTRY(struct adv_ccb_info) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ccb_cinfo_ptr spriv_ptr0
|
#define ccb_cinfo_ptr spriv_ptr0
|
||||||
|
@ -497,9 +497,9 @@ struct adv_softc {
|
||||||
bus_space_tag_t tag;
|
bus_space_tag_t tag;
|
||||||
bus_space_handle_t bsh;
|
bus_space_handle_t bsh;
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
struct adv_ccb_info *ccb_infos;
|
struct adv_ccb_info *ccb_infos;
|
||||||
SLIST_HEAD(, adv_ccb_info) free_ccb_infos;
|
SLIST_HEAD(, struct adv_ccb_info) free_ccb_infos;
|
||||||
bus_dma_tag_t parent_dmat;
|
bus_dma_tag_t parent_dmat;
|
||||||
bus_dma_tag_t buffer_dmat;
|
bus_dma_tag_t buffer_dmat;
|
||||||
bus_dma_tag_t sense_dmat;
|
bus_dma_tag_t sense_dmat;
|
||||||
|
|
|
@ -324,7 +324,7 @@ struct sg_map_node {
|
||||||
bus_dmamap_t sg_dmamap;
|
bus_dmamap_t sg_dmamap;
|
||||||
bus_addr_t sg_physaddr;
|
bus_addr_t sg_physaddr;
|
||||||
struct adw_sg_block* sg_vaddr;
|
struct adw_sg_block* sg_vaddr;
|
||||||
SLIST_ENTRY(sg_map_node) links;
|
SLIST_ENTRY(struct sg_map_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -425,7 +425,7 @@ struct acb {
|
||||||
struct adw_sg_block* sg_blocks;
|
struct adw_sg_block* sg_blocks;
|
||||||
bus_addr_t sg_busaddr;
|
bus_addr_t sg_busaddr;
|
||||||
struct scsi_sense_data sense_data;
|
struct scsi_sense_data sense_data;
|
||||||
SLIST_ENTRY(acb) links;
|
SLIST_ENTRY(struct acb) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -612,15 +612,15 @@ struct adw_softc
|
||||||
struct adw_carrier *free_carriers;
|
struct adw_carrier *free_carriers;
|
||||||
struct adw_carrier *commandq;
|
struct adw_carrier *commandq;
|
||||||
struct adw_carrier *responseq;
|
struct adw_carrier *responseq;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
SLIST_HEAD(, acb) free_acb_list;
|
SLIST_HEAD(, struct acb) free_acb_list;
|
||||||
bus_dma_tag_t parent_dmat;
|
bus_dma_tag_t parent_dmat;
|
||||||
bus_dma_tag_t carrier_dmat; /* dmat for our acb carriers*/
|
bus_dma_tag_t carrier_dmat; /* dmat for our acb carriers*/
|
||||||
bus_dmamap_t carrier_dmamap;
|
bus_dmamap_t carrier_dmamap;
|
||||||
bus_dma_tag_t acb_dmat; /* dmat for our ccb array */
|
bus_dma_tag_t acb_dmat; /* dmat for our ccb array */
|
||||||
bus_dmamap_t acb_dmamap;
|
bus_dmamap_t acb_dmamap;
|
||||||
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
||||||
SLIST_HEAD(, sg_map_node) sg_maps;
|
SLIST_HEAD(, struct sg_map_node) sg_maps;
|
||||||
bus_addr_t acb_busbase;
|
bus_addr_t acb_busbase;
|
||||||
bus_addr_t carrier_busbase;
|
bus_addr_t carrier_busbase;
|
||||||
adw_chip chip;
|
adw_chip chip;
|
||||||
|
|
|
@ -319,7 +319,7 @@ typedef enum {
|
||||||
|
|
||||||
struct aha_ccb {
|
struct aha_ccb {
|
||||||
struct aha_hccb hccb; /* hccb assumed to be at 0 */
|
struct aha_hccb hccb; /* hccb assumed to be at 0 */
|
||||||
SLIST_ENTRY(aha_ccb) links;
|
SLIST_ENTRY(struct aha_ccb) links;
|
||||||
u_int32_t flags;
|
u_int32_t flags;
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
|
@ -331,7 +331,7 @@ struct sg_map_node {
|
||||||
bus_dmamap_t sg_dmamap;
|
bus_dmamap_t sg_dmamap;
|
||||||
bus_addr_t sg_physaddr;
|
bus_addr_t sg_physaddr;
|
||||||
aha_sg_t* sg_vaddr;
|
aha_sg_t* sg_vaddr;
|
||||||
SLIST_ENTRY(sg_map_node) links;
|
SLIST_ENTRY(struct sg_map_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aha_softc {
|
struct aha_softc {
|
||||||
|
@ -344,8 +344,8 @@ struct aha_softc {
|
||||||
aha_mbox_out_t *last_outbox;
|
aha_mbox_out_t *last_outbox;
|
||||||
aha_mbox_in_t *last_inbox;
|
aha_mbox_in_t *last_inbox;
|
||||||
struct aha_ccb *aha_ccb_array;
|
struct aha_ccb *aha_ccb_array;
|
||||||
SLIST_HEAD(,aha_ccb) free_aha_ccbs;
|
SLIST_HEAD(, struct aha_ccb) free_aha_ccbs;
|
||||||
LIST_HEAD(,ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
u_int active_ccbs;
|
u_int active_ccbs;
|
||||||
u_int32_t aha_ccb_physbase;
|
u_int32_t aha_ccb_physbase;
|
||||||
aha_ccb_opcode_t ccb_sg_opcode;
|
aha_ccb_opcode_t ccb_sg_opcode;
|
||||||
|
@ -367,7 +367,7 @@ struct aha_softc {
|
||||||
bus_dma_tag_t ccb_dmat; /* dmat for our ccb array */
|
bus_dma_tag_t ccb_dmat; /* dmat for our ccb array */
|
||||||
bus_dmamap_t ccb_dmamap;
|
bus_dmamap_t ccb_dmamap;
|
||||||
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
||||||
SLIST_HEAD(, sg_map_node) sg_maps;
|
SLIST_HEAD(, struct sg_map_node) sg_maps;
|
||||||
bus_addr_t mailbox_physbase;
|
bus_addr_t mailbox_physbase;
|
||||||
u_int num_ccbs; /* Number of CCBs malloc'd */
|
u_int num_ccbs; /* Number of CCBs malloc'd */
|
||||||
u_int max_ccbs; /* Maximum allocatable CCBs */
|
u_int max_ccbs; /* Maximum allocatable CCBs */
|
||||||
|
|
|
@ -251,7 +251,7 @@ struct ecb {
|
||||||
struct ecb_status status;
|
struct ecb_status status;
|
||||||
struct scsi_sense_data sense;
|
struct scsi_sense_data sense;
|
||||||
ahb_sg_t sg_list[AHB_NSEG];
|
ahb_sg_t sg_list[AHB_NSEG];
|
||||||
SLIST_ENTRY(ecb) links;
|
SLIST_ENTRY(struct ecb) links;
|
||||||
ecb_state state;
|
ecb_state state;
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
|
@ -262,8 +262,8 @@ struct ahb_softc {
|
||||||
bus_space_handle_t bsh;
|
bus_space_handle_t bsh;
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
SLIST_HEAD(,ecb) free_ecbs;
|
SLIST_HEAD(, struct ecb) free_ecbs;
|
||||||
LIST_HEAD(,ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
struct ecb *ecb_array;
|
struct ecb *ecb_array;
|
||||||
u_int32_t ecb_physbase;
|
u_int32_t ecb_physbase;
|
||||||
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
|
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
|
||||||
|
|
|
@ -76,7 +76,7 @@ struct aic_softc {
|
||||||
|
|
||||||
struct cam_sim *sim;
|
struct cam_sim *sim;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
TAILQ_HEAD(,ccb_hdr) pending_ccbs, nexus_ccbs;
|
TAILQ_HEAD(, struct ccb_hdr) pending_ccbs, nexus_ccbs;
|
||||||
struct aic_scb *nexus;
|
struct aic_scb *nexus;
|
||||||
|
|
||||||
u_int32_t flags;
|
u_int32_t flags;
|
||||||
|
|
|
@ -250,7 +250,7 @@ struct hardware_scb {
|
||||||
|
|
||||||
struct scb {
|
struct scb {
|
||||||
struct hardware_scb *hscb;
|
struct hardware_scb *hscb;
|
||||||
SLIST_ENTRY(scb) links; /* for chaining */
|
SLIST_ENTRY(struct scb) links; /* for chaining */
|
||||||
union ccb *ccb; /* the ccb for this cmd */
|
union ccb *ccb; /* the ccb for this cmd */
|
||||||
scb_flag flags;
|
scb_flag flags;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
|
@ -432,13 +432,13 @@ struct sg_map_node {
|
||||||
bus_dmamap_t sg_dmamap;
|
bus_dmamap_t sg_dmamap;
|
||||||
bus_addr_t sg_physaddr;
|
bus_addr_t sg_physaddr;
|
||||||
struct ahc_dma_seg* sg_vaddr;
|
struct ahc_dma_seg* sg_vaddr;
|
||||||
SLIST_ENTRY(sg_map_node) links;
|
SLIST_ENTRY(struct sg_map_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scb_data {
|
struct scb_data {
|
||||||
struct hardware_scb *hscbs; /* Array of hardware SCBs */
|
struct hardware_scb *hscbs; /* Array of hardware SCBs */
|
||||||
struct scb *scbarray; /* Array of kernel SCBs */
|
struct scb *scbarray; /* Array of kernel SCBs */
|
||||||
SLIST_HEAD(, scb) free_scbs; /*
|
SLIST_HEAD(, struct scb) free_scbs; /*
|
||||||
* Pool of SCBs ready to be assigned
|
* Pool of SCBs ready to be assigned
|
||||||
* commands to execute.
|
* commands to execute.
|
||||||
*/
|
*/
|
||||||
|
@ -454,7 +454,7 @@ struct scb_data {
|
||||||
bus_dmamap_t sense_dmamap;
|
bus_dmamap_t sense_dmamap;
|
||||||
bus_addr_t sense_busaddr;
|
bus_addr_t sense_busaddr;
|
||||||
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
|
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
|
||||||
SLIST_HEAD(, sg_map_node) sg_maps;
|
SLIST_HEAD(, struct sg_map_node) sg_maps;
|
||||||
u_int8_t numscbs;
|
u_int8_t numscbs;
|
||||||
u_int8_t maxhscbs; /* Number of SCBs on the card */
|
u_int8_t maxhscbs; /* Number of SCBs on the card */
|
||||||
u_int8_t init_level; /*
|
u_int8_t init_level; /*
|
||||||
|
@ -472,7 +472,7 @@ struct ahc_softc {
|
||||||
/*
|
/*
|
||||||
* CCBs that have been send to the controller
|
* CCBs that have been send to the controller
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Target mode related state kept on a per enabled lun basis.
|
* Target mode related state kept on a per enabled lun basis.
|
||||||
|
|
|
@ -42,14 +42,14 @@
|
||||||
#include "sequencer.h"
|
#include "sequencer.h"
|
||||||
|
|
||||||
typedef struct patch {
|
typedef struct patch {
|
||||||
STAILQ_ENTRY(patch) links;
|
STAILQ_ENTRY(struct patch) links;
|
||||||
int patch_func;
|
int patch_func;
|
||||||
u_int begin;
|
u_int begin;
|
||||||
u_int skip_instr;
|
u_int skip_instr;
|
||||||
u_int skip_patch;
|
u_int skip_patch;
|
||||||
} patch_t;
|
} patch_t;
|
||||||
|
|
||||||
STAILQ_HEAD(patch_list, patch) patches;
|
STAILQ_HEAD(patch_list, struct patch) patches;
|
||||||
|
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
static void back_patch(void);
|
static void back_patch(void);
|
||||||
|
@ -70,7 +70,7 @@ FILE *regfile;
|
||||||
char *listfilename;
|
char *listfilename;
|
||||||
FILE *listfile;
|
FILE *listfile;
|
||||||
|
|
||||||
static STAILQ_HEAD(,instruction) seq_program;
|
static STAILQ_HEAD(, struct instruction) seq_program;
|
||||||
struct scope_list scope_stack;
|
struct scope_list scope_stack;
|
||||||
symlist_t patch_functions;
|
symlist_t patch_functions;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
typedef struct path_entry {
|
typedef struct path_entry {
|
||||||
char *directory;
|
char *directory;
|
||||||
int quoted_includes_only;
|
int quoted_includes_only;
|
||||||
SLIST_ENTRY(path_entry) links;
|
SLIST_ENTRY(struct path_entry) links;
|
||||||
} *path_entry_t;
|
} *path_entry_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -50,7 +50,7 @@ typedef enum {
|
||||||
SOURCE_FILE
|
SOURCE_FILE
|
||||||
} include_type;
|
} include_type;
|
||||||
|
|
||||||
SLIST_HEAD(path_list, path_entry);
|
SLIST_HEAD(path_list, struct path_entry);
|
||||||
|
|
||||||
extern struct path_list search_path;
|
extern struct path_list search_path;
|
||||||
extern struct scope_list scope_stack;
|
extern struct scope_list scope_stack;
|
||||||
|
|
|
@ -42,14 +42,14 @@
|
||||||
#include "sequencer.h"
|
#include "sequencer.h"
|
||||||
|
|
||||||
typedef struct patch {
|
typedef struct patch {
|
||||||
STAILQ_ENTRY(patch) links;
|
STAILQ_ENTRY(struct patch) links;
|
||||||
int patch_func;
|
int patch_func;
|
||||||
u_int begin;
|
u_int begin;
|
||||||
u_int skip_instr;
|
u_int skip_instr;
|
||||||
u_int skip_patch;
|
u_int skip_patch;
|
||||||
} patch_t;
|
} patch_t;
|
||||||
|
|
||||||
STAILQ_HEAD(patch_list, patch) patches;
|
STAILQ_HEAD(patch_list, struct patch) patches;
|
||||||
|
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
static void back_patch(void);
|
static void back_patch(void);
|
||||||
|
@ -70,7 +70,7 @@ FILE *regfile;
|
||||||
char *listfilename;
|
char *listfilename;
|
||||||
FILE *listfile;
|
FILE *listfile;
|
||||||
|
|
||||||
static STAILQ_HEAD(,instruction) seq_program;
|
static STAILQ_HEAD(, struct instruction) seq_program;
|
||||||
struct scope_list scope_stack;
|
struct scope_list scope_stack;
|
||||||
symlist_t patch_functions;
|
symlist_t patch_functions;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
typedef struct path_entry {
|
typedef struct path_entry {
|
||||||
char *directory;
|
char *directory;
|
||||||
int quoted_includes_only;
|
int quoted_includes_only;
|
||||||
SLIST_ENTRY(path_entry) links;
|
SLIST_ENTRY(struct path_entry) links;
|
||||||
} *path_entry_t;
|
} *path_entry_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -50,7 +50,7 @@ typedef enum {
|
||||||
SOURCE_FILE
|
SOURCE_FILE
|
||||||
} include_type;
|
} include_type;
|
||||||
|
|
||||||
SLIST_HEAD(path_list, path_entry);
|
SLIST_HEAD(path_list, struct path_entry);
|
||||||
|
|
||||||
extern struct path_list search_path;
|
extern struct path_list search_path;
|
||||||
extern struct scope_list scope_stack;
|
extern struct scope_list scope_stack;
|
||||||
|
|
|
@ -200,10 +200,10 @@ typedef struct include {
|
||||||
YY_BUFFER_STATE buffer;
|
YY_BUFFER_STATE buffer;
|
||||||
int lineno;
|
int lineno;
|
||||||
char *filename;
|
char *filename;
|
||||||
SLIST_ENTRY(include) links;
|
SLIST_ENTRY(struct include) links;
|
||||||
}include_t;
|
}include_t;
|
||||||
|
|
||||||
SLIST_HEAD(, include) include_stack;
|
SLIST_HEAD(, struct include) include_stack;
|
||||||
|
|
||||||
void
|
void
|
||||||
include_file(file_name, type)
|
include_file(file_name, type)
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct reg_info {
|
||||||
int typecheck_masks;
|
int typecheck_masks;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SLIST_HEAD(symlist, symbol_node) symlist_t;
|
typedef SLIST_HEAD(symlist, struct symbol_node) symlist_t;
|
||||||
|
|
||||||
struct mask_info {
|
struct mask_info {
|
||||||
symlist_t symrefs;
|
symlist_t symrefs;
|
||||||
|
@ -106,7 +106,7 @@ typedef struct symbol_ref {
|
||||||
} symbol_ref_t;
|
} symbol_ref_t;
|
||||||
|
|
||||||
typedef struct symbol_node {
|
typedef struct symbol_node {
|
||||||
SLIST_ENTRY(symbol_node) links;
|
SLIST_ENTRY(struct symbol_node) links;
|
||||||
symbol_t *symbol;
|
symbol_t *symbol;
|
||||||
}symbol_node_t;
|
}symbol_node_t;
|
||||||
|
|
||||||
|
@ -123,9 +123,9 @@ typedef struct patch_info {
|
||||||
} patch_info_t;
|
} patch_info_t;
|
||||||
|
|
||||||
typedef struct scope {
|
typedef struct scope {
|
||||||
SLIST_ENTRY(scope) scope_stack_links;
|
SLIST_ENTRY(struct scope) scope_stack_links;
|
||||||
TAILQ_ENTRY(scope) scope_links;
|
TAILQ_ENTRY(struct scope) scope_links;
|
||||||
TAILQ_HEAD(, scope) inner_scope;
|
TAILQ_HEAD(, struct scope) inner_scope;
|
||||||
scope_type type;
|
scope_type type;
|
||||||
int inner_scope_patches;
|
int inner_scope_patches;
|
||||||
int begin_addr;
|
int begin_addr;
|
||||||
|
@ -134,8 +134,8 @@ typedef struct scope {
|
||||||
int func_num;
|
int func_num;
|
||||||
} scope_t;
|
} scope_t;
|
||||||
|
|
||||||
SLIST_HEAD(scope_list, scope);
|
SLIST_HEAD(scope_list, struct scope);
|
||||||
TAILQ_HEAD(scope_tailq, scope);
|
TAILQ_HEAD(scope_tailq, struct scope);
|
||||||
|
|
||||||
void symbol_delete __P((symbol_t *symbol));
|
void symbol_delete __P((symbol_t *symbol));
|
||||||
|
|
||||||
|
|
|
@ -200,10 +200,10 @@ typedef struct include {
|
||||||
YY_BUFFER_STATE buffer;
|
YY_BUFFER_STATE buffer;
|
||||||
int lineno;
|
int lineno;
|
||||||
char *filename;
|
char *filename;
|
||||||
SLIST_ENTRY(include) links;
|
SLIST_ENTRY(struct include) links;
|
||||||
}include_t;
|
}include_t;
|
||||||
|
|
||||||
SLIST_HEAD(, include) include_stack;
|
SLIST_HEAD(, struct include) include_stack;
|
||||||
|
|
||||||
void
|
void
|
||||||
include_file(file_name, type)
|
include_file(file_name, type)
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct reg_info {
|
||||||
int typecheck_masks;
|
int typecheck_masks;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SLIST_HEAD(symlist, symbol_node) symlist_t;
|
typedef SLIST_HEAD(symlist, struct symbol_node) symlist_t;
|
||||||
|
|
||||||
struct mask_info {
|
struct mask_info {
|
||||||
symlist_t symrefs;
|
symlist_t symrefs;
|
||||||
|
@ -106,7 +106,7 @@ typedef struct symbol_ref {
|
||||||
} symbol_ref_t;
|
} symbol_ref_t;
|
||||||
|
|
||||||
typedef struct symbol_node {
|
typedef struct symbol_node {
|
||||||
SLIST_ENTRY(symbol_node) links;
|
SLIST_ENTRY(struct symbol_node) links;
|
||||||
symbol_t *symbol;
|
symbol_t *symbol;
|
||||||
}symbol_node_t;
|
}symbol_node_t;
|
||||||
|
|
||||||
|
@ -123,9 +123,9 @@ typedef struct patch_info {
|
||||||
} patch_info_t;
|
} patch_info_t;
|
||||||
|
|
||||||
typedef struct scope {
|
typedef struct scope {
|
||||||
SLIST_ENTRY(scope) scope_stack_links;
|
SLIST_ENTRY(struct scope) scope_stack_links;
|
||||||
TAILQ_ENTRY(scope) scope_links;
|
TAILQ_ENTRY(struct scope) scope_links;
|
||||||
TAILQ_HEAD(, scope) inner_scope;
|
TAILQ_HEAD(, struct scope) inner_scope;
|
||||||
scope_type type;
|
scope_type type;
|
||||||
int inner_scope_patches;
|
int inner_scope_patches;
|
||||||
int begin_addr;
|
int begin_addr;
|
||||||
|
@ -134,8 +134,8 @@ typedef struct scope {
|
||||||
int func_num;
|
int func_num;
|
||||||
} scope_t;
|
} scope_t;
|
||||||
|
|
||||||
SLIST_HEAD(scope_list, scope);
|
SLIST_HEAD(scope_list, struct scope);
|
||||||
TAILQ_HEAD(scope_tailq, scope);
|
TAILQ_HEAD(scope_tailq, struct scope);
|
||||||
|
|
||||||
void symbol_delete __P((symbol_t *symbol));
|
void symbol_delete __P((symbol_t *symbol));
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ struct instruction {
|
||||||
union ins_formats format;
|
union ins_formats format;
|
||||||
u_int srcline;
|
u_int srcline;
|
||||||
struct symbol *patch_label;
|
struct symbol *patch_label;
|
||||||
STAILQ_ENTRY(instruction) links;
|
STAILQ_ENTRY(struct instruction) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AIC_OP_OR 0x0
|
#define AIC_OP_OR 0x0
|
||||||
|
|
|
@ -154,7 +154,7 @@ typedef struct _EEprom {
|
||||||
* SCSI Request Block
|
* SCSI Request Block
|
||||||
*/
|
*/
|
||||||
struct amd_srb {
|
struct amd_srb {
|
||||||
TAILQ_ENTRY(amd_srb) links;
|
TAILQ_ENTRY(struct amd_srb) links;
|
||||||
u_int8_t CmdBlock[12];
|
u_int8_t CmdBlock[12];
|
||||||
union ccb *pccb;
|
union ccb *pccb;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
|
@ -187,7 +187,7 @@ struct amd_srb {
|
||||||
u_int8_t ScsiCmdLen;
|
u_int8_t ScsiCmdLen;
|
||||||
};
|
};
|
||||||
|
|
||||||
TAILQ_HEAD(srb_queue, amd_srb);
|
TAILQ_HEAD(srb_queue, struct amd_srb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Per-adapter, software configuration.
|
* Per-adapter, software configuration.
|
||||||
|
|
|
@ -69,7 +69,7 @@ struct amr_logdrive
|
||||||
*/
|
*/
|
||||||
struct amr_command
|
struct amr_command
|
||||||
{
|
{
|
||||||
TAILQ_ENTRY(amr_command) ac_link;
|
TAILQ_ENTRY(struct amr_command) ac_link;
|
||||||
|
|
||||||
struct amr_softc *ac_sc;
|
struct amr_softc *ac_sc;
|
||||||
u_int8_t ac_slot;
|
u_int8_t ac_slot;
|
||||||
|
@ -140,9 +140,9 @@ struct amr_softc
|
||||||
int amr_waitbufs;
|
int amr_waitbufs;
|
||||||
struct amr_command *amr_busycmd[AMR_MAXCMD];
|
struct amr_command *amr_busycmd[AMR_MAXCMD];
|
||||||
int amr_busycmdcount;
|
int amr_busycmdcount;
|
||||||
TAILQ_HEAD(,amr_command) amr_work;
|
TAILQ_HEAD(, struct amr_command) amr_work;
|
||||||
int amr_workcount;
|
int amr_workcount;
|
||||||
TAILQ_HEAD(,amr_command) amr_freecmds;
|
TAILQ_HEAD(, struct amr_command) amr_freecmds;
|
||||||
|
|
||||||
int amr_locks; /* reentrancy avoidance */
|
int amr_locks; /* reentrancy avoidance */
|
||||||
|
|
||||||
|
|
|
@ -304,8 +304,8 @@ struct ata_softc {
|
||||||
#define ATA_ACTIVE_ATAPI 0x6
|
#define ATA_ACTIVE_ATAPI 0x6
|
||||||
#define ATA_REINITING 0x7
|
#define ATA_REINITING 0x7
|
||||||
|
|
||||||
TAILQ_HEAD(, ad_request) ata_queue; /* head of ATA queue */
|
TAILQ_HEAD(, struct ad_request) ata_queue; /* head of ATA queue */
|
||||||
TAILQ_HEAD(, atapi_request) atapi_queue; /* head of ATAPI queue */
|
TAILQ_HEAD(, struct atapi_request) atapi_queue; /* head of ATAPI queue */
|
||||||
void *running; /* currently running request */
|
void *running; /* currently running request */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct ad_request {
|
||||||
int8_t *data; /* pointer to data buf */
|
int8_t *data; /* pointer to data buf */
|
||||||
struct bio *bp; /* associated bio ptr */
|
struct bio *bp; /* associated bio ptr */
|
||||||
u_int8_t tag; /* tag ID of this request */
|
u_int8_t tag; /* tag ID of this request */
|
||||||
TAILQ_ENTRY(ad_request) chain; /* list management */
|
TAILQ_ENTRY(struct ad_request) chain; /* list management */
|
||||||
};
|
};
|
||||||
|
|
||||||
void ad_attach(struct ata_softc *, int32_t);
|
void ad_attach(struct ata_softc *, int32_t);
|
||||||
|
|
|
@ -174,7 +174,7 @@ struct atapi_request {
|
||||||
int8_t *data; /* pointer to data buf */
|
int8_t *data; /* pointer to data buf */
|
||||||
atapi_callback_t *callback; /* ptr to callback func */
|
atapi_callback_t *callback; /* ptr to callback func */
|
||||||
void *driver; /* driver specific */
|
void *driver; /* driver specific */
|
||||||
TAILQ_ENTRY(atapi_request) chain; /* list management */
|
TAILQ_ENTRY(struct atapi_request) chain; /* list management */
|
||||||
};
|
};
|
||||||
|
|
||||||
void atapi_attach(struct ata_softc *, int32_t);
|
void atapi_attach(struct ata_softc *, int32_t);
|
||||||
|
|
|
@ -61,7 +61,7 @@ enum awi_status {
|
||||||
|
|
||||||
struct awi_bss
|
struct awi_bss
|
||||||
{
|
{
|
||||||
TAILQ_ENTRY(awi_bss) list;
|
TAILQ_ENTRY(struct awi_bss) list;
|
||||||
u_int8_t esrc[ETHER_ADDR_LEN];
|
u_int8_t esrc[ETHER_ADDR_LEN];
|
||||||
u_int8_t chanset; /* channel set to use */
|
u_int8_t chanset; /* channel set to use */
|
||||||
u_int8_t pattern; /* hop pattern to use */
|
u_int8_t pattern; /* hop pattern to use */
|
||||||
|
@ -116,7 +116,7 @@ struct awi_softc
|
||||||
|
|
||||||
int sc_mgt_timer;
|
int sc_mgt_timer;
|
||||||
|
|
||||||
TAILQ_HEAD(, awi_bss) sc_scan;
|
TAILQ_HEAD(, struct awi_bss) sc_scan;
|
||||||
u_int8_t sc_scan_cur;
|
u_int8_t sc_scan_cur;
|
||||||
u_int8_t sc_scan_min;
|
u_int8_t sc_scan_min;
|
||||||
u_int8_t sc_scan_max;
|
u_int8_t sc_scan_max;
|
||||||
|
|
|
@ -580,7 +580,7 @@ typedef enum {
|
||||||
|
|
||||||
struct bt_ccb {
|
struct bt_ccb {
|
||||||
struct bt_hccb hccb;
|
struct bt_hccb hccb;
|
||||||
SLIST_ENTRY(bt_ccb) links;
|
SLIST_ENTRY(struct bt_ccb) links;
|
||||||
u_int32_t flags;
|
u_int32_t flags;
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
|
@ -592,7 +592,7 @@ struct sg_map_node {
|
||||||
bus_dmamap_t sg_dmamap;
|
bus_dmamap_t sg_dmamap;
|
||||||
bus_addr_t sg_physaddr;
|
bus_addr_t sg_physaddr;
|
||||||
bt_sg_t* sg_vaddr;
|
bt_sg_t* sg_vaddr;
|
||||||
SLIST_ENTRY(sg_map_node) links;
|
SLIST_ENTRY(struct sg_map_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bt_softc {
|
struct bt_softc {
|
||||||
|
@ -610,8 +610,8 @@ struct bt_softc {
|
||||||
bt_mbox_out_t *last_outbox;
|
bt_mbox_out_t *last_outbox;
|
||||||
bt_mbox_in_t *last_inbox;
|
bt_mbox_in_t *last_inbox;
|
||||||
struct bt_ccb *bt_ccb_array;
|
struct bt_ccb *bt_ccb_array;
|
||||||
SLIST_HEAD(,bt_ccb) free_bt_ccbs;
|
SLIST_HEAD(, struct bt_ccb) free_bt_ccbs;
|
||||||
LIST_HEAD(,ccb_hdr) pending_ccbs;
|
LIST_HEAD(, struct ccb_hdr) pending_ccbs;
|
||||||
u_int active_ccbs;
|
u_int active_ccbs;
|
||||||
u_int32_t bt_ccb_physbase;
|
u_int32_t bt_ccb_physbase;
|
||||||
bt_mbox_in_t *in_boxes;
|
bt_mbox_in_t *in_boxes;
|
||||||
|
@ -633,7 +633,7 @@ struct bt_softc {
|
||||||
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
|
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
|
||||||
bus_dma_tag_t sense_dmat; /* dmat for our sense buffers */
|
bus_dma_tag_t sense_dmat; /* dmat for our sense buffers */
|
||||||
bus_dmamap_t sense_dmamap;
|
bus_dmamap_t sense_dmamap;
|
||||||
SLIST_HEAD(, sg_map_node) sg_maps;
|
SLIST_HEAD(, struct sg_map_node) sg_maps;
|
||||||
bus_addr_t mailbox_physbase;
|
bus_addr_t mailbox_physbase;
|
||||||
u_int num_ccbs; /* Number of CCBs malloc'd */
|
u_int num_ccbs; /* Number of CCBs malloc'd */
|
||||||
u_int max_ccbs; /* Maximum allocatable CCBs */
|
u_int max_ccbs; /* Maximum allocatable CCBs */
|
||||||
|
|
|
@ -894,7 +894,7 @@ typedef struct dpt_ccb {
|
||||||
u_int32_t transaction_id;
|
u_int32_t transaction_id;
|
||||||
u_int32_t result;
|
u_int32_t result;
|
||||||
caddr_t data;
|
caddr_t data;
|
||||||
SLIST_ENTRY(dpt_ccb) links;
|
SLIST_ENTRY(struct dpt_ccb) links;
|
||||||
|
|
||||||
#ifdef DPT_MEASURE_PERFORMANCE
|
#ifdef DPT_MEASURE_PERFORMANCE
|
||||||
u_int32_t submitted_time;
|
u_int32_t submitted_time;
|
||||||
|
@ -1016,7 +1016,7 @@ struct sg_map_node {
|
||||||
bus_dmamap_t sg_dmamap;
|
bus_dmamap_t sg_dmamap;
|
||||||
bus_addr_t sg_physaddr;
|
bus_addr_t sg_physaddr;
|
||||||
dpt_sg_t* sg_vaddr;
|
dpt_sg_t* sg_vaddr;
|
||||||
SLIST_ENTRY(sg_map_node) links;
|
SLIST_ENTRY(struct sg_map_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Main state machine and interface structure */
|
/* Main state machine and interface structure */
|
||||||
|
@ -1039,14 +1039,14 @@ typedef struct dpt_softc {
|
||||||
int pending_ccbs;
|
int pending_ccbs;
|
||||||
int completed_ccbs;
|
int completed_ccbs;
|
||||||
|
|
||||||
SLIST_HEAD(, dpt_ccb) free_dccb_list;
|
SLIST_HEAD(, struct dpt_ccb) free_dccb_list;
|
||||||
LIST_HEAD(, ccb_hdr) pending_ccb_list;
|
LIST_HEAD(, struct ccb_hdr) pending_ccb_list;
|
||||||
|
|
||||||
bus_dma_tag_t parent_dmat;
|
bus_dma_tag_t parent_dmat;
|
||||||
bus_dma_tag_t dccb_dmat; /* dmat for our ccb array */
|
bus_dma_tag_t dccb_dmat; /* dmat for our ccb array */
|
||||||
bus_dmamap_t dccb_dmamap;
|
bus_dmamap_t dccb_dmamap;
|
||||||
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
bus_dma_tag_t sg_dmat; /* dmat for our sg maps */
|
||||||
SLIST_HEAD(, sg_map_node) sg_maps;
|
SLIST_HEAD(, struct sg_map_node) sg_maps;
|
||||||
|
|
||||||
struct cam_sim *sims[MAX_CHANNELS];
|
struct cam_sim *sims[MAX_CHANNELS];
|
||||||
struct cam_path *paths[MAX_CHANNELS];
|
struct cam_path *paths[MAX_CHANNELS];
|
||||||
|
@ -1069,7 +1069,7 @@ typedef struct dpt_softc {
|
||||||
u_int8_t irq;
|
u_int8_t irq;
|
||||||
u_int8_t dma_channel;
|
u_int8_t dma_channel;
|
||||||
|
|
||||||
TAILQ_ENTRY(dpt_softc) links;
|
TAILQ_ENTRY(struct dpt_softc) links;
|
||||||
int unit;
|
int unit;
|
||||||
int init_level;
|
int init_level;
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ dpt_time_delta(struct timeval start,
|
||||||
(end.tv_usec - start.tv_usec) );
|
(end.tv_usec - start.tv_usec) );
|
||||||
}
|
}
|
||||||
|
|
||||||
extern TAILQ_HEAD(dpt_softc_list, dpt_softc) dpt_softcs;
|
extern TAILQ_HEAD(dpt_softc_list, struct dpt_softc) dpt_softcs;
|
||||||
|
|
||||||
extern int dpt_controllers_present;
|
extern int dpt_controllers_present;
|
||||||
|
|
||||||
|
|
|
@ -53,19 +53,19 @@ typedef struct resvaddr {
|
||||||
u_long size; /* size of reserved area */
|
u_long size; /* size of reserved area */
|
||||||
int flags;
|
int flags;
|
||||||
struct resource *res; /* resource manager handle */
|
struct resource *res; /* resource manager handle */
|
||||||
LIST_ENTRY(resvaddr) links; /* List links */
|
LIST_ENTRY(struct resvaddr) links; /* List links */
|
||||||
} resvaddr_t;
|
} resvaddr_t;
|
||||||
|
|
||||||
LIST_HEAD(resvlist, resvaddr);
|
LIST_HEAD(resvlist, struct resvaddr);
|
||||||
|
|
||||||
struct irq_node {
|
struct irq_node {
|
||||||
int irq_no;
|
int irq_no;
|
||||||
int irq_trigger;
|
int irq_trigger;
|
||||||
void *idesc;
|
void *idesc;
|
||||||
TAILQ_ENTRY(irq_node) links;
|
TAILQ_ENTRY(struct irq_node) links;
|
||||||
};
|
};
|
||||||
|
|
||||||
TAILQ_HEAD(irqlist, irq_node);
|
TAILQ_HEAD(irqlist, struct irq_node);
|
||||||
|
|
||||||
struct eisa_ioconf {
|
struct eisa_ioconf {
|
||||||
int slot;
|
int slot;
|
||||||
|
|
|
@ -98,8 +98,8 @@ struct ida_qcb {
|
||||||
qcb_state state;
|
qcb_state state;
|
||||||
short flags;
|
short flags;
|
||||||
union {
|
union {
|
||||||
STAILQ_ENTRY(ida_qcb) stqe;
|
STAILQ_ENTRY(struct ida_qcb) stqe;
|
||||||
SLIST_ENTRY(ida_qcb) sle;
|
SLIST_ENTRY(struct ida_qcb) sle;
|
||||||
} link;
|
} link;
|
||||||
bus_dmamap_t dmamap;
|
bus_dmamap_t dmamap;
|
||||||
bus_addr_t hwqcb_busaddr;
|
bus_addr_t hwqcb_busaddr;
|
||||||
|
@ -152,8 +152,8 @@ struct ida_softc {
|
||||||
|
|
||||||
struct ida_hardware_qcb *hwqcbs; /* HW QCB array */
|
struct ida_hardware_qcb *hwqcbs; /* HW QCB array */
|
||||||
struct ida_qcb *qcbs; /* kernel QCB array */
|
struct ida_qcb *qcbs; /* kernel QCB array */
|
||||||
SLIST_HEAD(, ida_qcb) free_qcbs;
|
SLIST_HEAD(, struct ida_qcb) free_qcbs;
|
||||||
STAILQ_HEAD(, ida_qcb) qcb_queue;
|
STAILQ_HEAD(, struct ida_qcb) qcb_queue;
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
|
|
||||||
struct ida_access cmd;
|
struct ida_access cmd;
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef struct genkbd_softc {
|
||||||
struct selinfo gkb_rsel;
|
struct selinfo gkb_rsel;
|
||||||
} genkbd_softc_t;
|
} genkbd_softc_t;
|
||||||
|
|
||||||
static SLIST_HEAD(, keyboard_driver) keyboard_drivers =
|
static SLIST_HEAD(, struct keyboard_driver) keyboard_drivers =
|
||||||
SLIST_HEAD_INITIALIZER(keyboard_drivers);
|
SLIST_HEAD_INITIALIZER(keyboard_drivers);
|
||||||
|
|
||||||
/* local arrays */
|
/* local arrays */
|
||||||
|
@ -164,7 +164,7 @@ kbd_add_driver(keyboard_driver_t *driver)
|
||||||
int
|
int
|
||||||
kbd_delete_driver(keyboard_driver_t *driver)
|
kbd_delete_driver(keyboard_driver_t *driver)
|
||||||
{
|
{
|
||||||
SLIST_REMOVE(&keyboard_drivers, driver, keyboard_driver, link);
|
SLIST_REMOVE(&keyboard_drivers, driver, struct keyboard_driver, link);
|
||||||
SLIST_NEXT(driver, link) = NULL;
|
SLIST_NEXT(driver, link) = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,7 @@ typedef struct keyboard_switch {
|
||||||
|
|
||||||
/* keyboard driver */
|
/* keyboard driver */
|
||||||
typedef struct keyboard_driver {
|
typedef struct keyboard_driver {
|
||||||
SLIST_ENTRY(keyboard_driver) link;
|
SLIST_ENTRY(struct keyboard_driver) link;
|
||||||
char *name;
|
char *name;
|
||||||
keyboard_switch_t *kbdsw;
|
keyboard_switch_t *kbdsw;
|
||||||
int (*configure)(int); /* backdoor for the console driver */
|
int (*configure)(int); /* backdoor for the console driver */
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct mii_data {
|
||||||
* PHYs is required so they can all be notified when a media
|
* PHYs is required so they can all be notified when a media
|
||||||
* request is made.
|
* request is made.
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(mii_listhead, mii_softc) mii_phys;
|
LIST_HEAD(mii_listhead, struct mii_softc) mii_phys;
|
||||||
int mii_instance;
|
int mii_instance;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -113,7 +113,7 @@ typedef int (*mii_downcall_t) __P((struct mii_softc *, struct mii_data *, int));
|
||||||
struct mii_softc {
|
struct mii_softc {
|
||||||
device_t mii_dev; /* generic device glue */
|
device_t mii_dev; /* generic device glue */
|
||||||
|
|
||||||
LIST_ENTRY(mii_softc) mii_list; /* entry on parent's PHY list */
|
LIST_ENTRY(struct mii_softc) mii_list; /* entry on parent's PHY list */
|
||||||
|
|
||||||
int mii_phy; /* our MII address */
|
int mii_phy; /* our MII address */
|
||||||
int mii_inst; /* instance for ifmedia */
|
int mii_inst; /* instance for ifmedia */
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct mlx_sysdrive
|
||||||
*/
|
*/
|
||||||
struct mlx_command
|
struct mlx_command
|
||||||
{
|
{
|
||||||
TAILQ_ENTRY(mlx_command) mc_link; /* list linkage */
|
TAILQ_ENTRY(struct mlx_command) mc_link; /* list linkage */
|
||||||
|
|
||||||
struct mlx_softc *mc_sc; /* controller that owns us */
|
struct mlx_softc *mc_sc; /* controller that owns us */
|
||||||
u_int8_t mc_slot; /* command slot we occupy */
|
u_int8_t mc_slot; /* command slot we occupy */
|
||||||
|
@ -128,8 +128,8 @@ struct mlx_softc
|
||||||
#define MLX_FEAT_PAUSEWORKS (1<<0) /* channel pause works as expected */
|
#define MLX_FEAT_PAUSEWORKS (1<<0) /* channel pause works as expected */
|
||||||
|
|
||||||
/* controller queues and arrays */
|
/* controller queues and arrays */
|
||||||
TAILQ_HEAD(, mlx_command) mlx_freecmds; /* command structures available for reuse */
|
TAILQ_HEAD(, struct mlx_command) mlx_freecmds; /* command structures available for reuse */
|
||||||
TAILQ_HEAD(, mlx_command) mlx_work; /* active commands */
|
TAILQ_HEAD(, struct mlx_command) mlx_work; /* active commands */
|
||||||
struct mlx_command *mlx_busycmd[MLX_NSLOTS]; /* busy commands */
|
struct mlx_command *mlx_busycmd[MLX_NSLOTS]; /* busy commands */
|
||||||
int mlx_busycmds; /* count of busy commands */
|
int mlx_busycmds; /* count of busy commands */
|
||||||
struct mlx_sysdrive mlx_sysdrive[MLX_MAXDRIVES]; /* system drives */
|
struct mlx_sysdrive mlx_sysdrive[MLX_MAXDRIVES]; /* system drives */
|
||||||
|
|
|
@ -103,7 +103,7 @@ struct pccard_config_entry {
|
||||||
u_long hostaddr;
|
u_long hostaddr;
|
||||||
} memspace[2]; /* XXX this could be as high as 8 */
|
} memspace[2]; /* XXX this could be as high as 8 */
|
||||||
int maxtwins;
|
int maxtwins;
|
||||||
STAILQ_ENTRY(pccard_config_entry) cfe_list;
|
STAILQ_ENTRY(struct pccard_config_entry) cfe_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pccard_function {
|
struct pccard_function {
|
||||||
|
@ -115,8 +115,8 @@ struct pccard_function {
|
||||||
u_long ccr_mask;
|
u_long ccr_mask;
|
||||||
struct resource *ccr_res;
|
struct resource *ccr_res;
|
||||||
int ccr_rid;
|
int ccr_rid;
|
||||||
STAILQ_HEAD(, pccard_config_entry) cfe_head;
|
STAILQ_HEAD(, struct pccard_config_entry) cfe_head;
|
||||||
STAILQ_ENTRY(pccard_function) pf_list;
|
STAILQ_ENTRY(struct pccard_function) pf_list;
|
||||||
/* run-time state */
|
/* run-time state */
|
||||||
struct pccard_softc *sc;
|
struct pccard_softc *sc;
|
||||||
struct pccard_config_entry *cfe;
|
struct pccard_config_entry *cfe;
|
||||||
|
@ -154,7 +154,7 @@ struct pccard_card {
|
||||||
#define PCCARD_PRODUCT_INVALID -1
|
#define PCCARD_PRODUCT_INVALID -1
|
||||||
u_int16_t error;
|
u_int16_t error;
|
||||||
#define PCCARD_CIS_INVALID { NULL, NULL, NULL, NULL }
|
#define PCCARD_CIS_INVALID { NULL, NULL, NULL, NULL }
|
||||||
STAILQ_HEAD(, pccard_function) pf_head;
|
STAILQ_HEAD(, struct pccard_function) pf_head;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PCCARD_MEM_ATTR 1
|
#define PCCARD_MEM_ATTR 1
|
||||||
|
|
|
@ -87,13 +87,13 @@ struct pci_quirk pci_quirks[] = {
|
||||||
#define PCI_MAPPORT 0x04 /* port map */
|
#define PCI_MAPPORT 0x04 /* port map */
|
||||||
|
|
||||||
struct pci_devinfo {
|
struct pci_devinfo {
|
||||||
STAILQ_ENTRY(pci_devinfo) pci_links;
|
STAILQ_ENTRY(struct pci_devinfo) pci_links;
|
||||||
struct resource_list resources;
|
struct resource_list resources;
|
||||||
pcicfgregs cfg;
|
pcicfgregs cfg;
|
||||||
struct pci_conf conf;
|
struct pci_conf conf;
|
||||||
};
|
};
|
||||||
|
|
||||||
static STAILQ_HEAD(devlist, pci_devinfo) pci_devq;
|
static STAILQ_HEAD(devlist, struct pci_devinfo) pci_devq;
|
||||||
u_int32_t pci_numdevs = 0;
|
u_int32_t pci_numdevs = 0;
|
||||||
static u_int32_t pci_generation = 0;
|
static u_int32_t pci_generation = 0;
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ pci_freecfg(struct pci_devinfo *dinfo)
|
||||||
if (dinfo->cfg.map != NULL)
|
if (dinfo->cfg.map != NULL)
|
||||||
free(dinfo->cfg.map, M_DEVBUF);
|
free(dinfo->cfg.map, M_DEVBUF);
|
||||||
/* XXX this hasn't been tested */
|
/* XXX this hasn't been tested */
|
||||||
STAILQ_REMOVE(devlist_head, dinfo, pci_devinfo, pci_links);
|
STAILQ_REMOVE(devlist_head, dinfo, struct pci_devinfo, pci_links);
|
||||||
free(dinfo, M_DEVBUF);
|
free(dinfo, M_DEVBUF);
|
||||||
|
|
||||||
/* increment the generation count */
|
/* increment the generation count */
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
struct proc;
|
struct proc;
|
||||||
|
|
||||||
struct pcic_event {
|
struct pcic_event {
|
||||||
STAILQ_ENTRY(pcic_event) pe_q;
|
STAILQ_ENTRY(struct pcic_event) pe_q;
|
||||||
int pe_type;
|
int pe_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ struct pcic_handle {
|
||||||
|
|
||||||
int shutdown;
|
int shutdown;
|
||||||
struct proc *event_thread;
|
struct proc *event_thread;
|
||||||
STAILQ_HEAD(, pcic_event) events;
|
STAILQ_HEAD(, struct pcic_event) events;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PCIC_FLAG_SOCKETP 0x0001
|
#define PCIC_FLAG_SOCKETP 0x0001
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ struct sk_jslot {
|
||||||
|
|
||||||
struct sk_jpool_entry {
|
struct sk_jpool_entry {
|
||||||
int slot;
|
int slot;
|
||||||
SLIST_ENTRY(sk_jpool_entry) jpool_entries;
|
SLIST_ENTRY(struct sk_jpool_entry) jpool_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sk_chain {
|
struct sk_chain {
|
||||||
|
@ -1209,8 +1209,8 @@ struct sk_if_softc {
|
||||||
struct sk_softc *sk_softc; /* parent controller */
|
struct sk_softc *sk_softc; /* parent controller */
|
||||||
int sk_tx_bmu; /* TX BMU register */
|
int sk_tx_bmu; /* TX BMU register */
|
||||||
int sk_if_flags;
|
int sk_if_flags;
|
||||||
SLIST_HEAD(__sk_jfreehead, sk_jpool_entry) sk_jfree_listhead;
|
SLIST_HEAD(__sk_jfreehead, struct sk_jpool_entry) sk_jfree_listhead;
|
||||||
SLIST_HEAD(__sk_jinusehead, sk_jpool_entry) sk_jinuse_listhead;
|
SLIST_HEAD(__sk_jinusehead, struct sk_jpool_entry) sk_jinuse_listhead;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SK_MAXUNIT 256
|
#define SK_MAXUNIT 256
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#undef EMUDEBUG
|
#undef EMUDEBUG
|
||||||
|
|
||||||
struct emu_memblk {
|
struct emu_memblk {
|
||||||
SLIST_ENTRY(emu_memblk) link;
|
SLIST_ENTRY(struct emu_memblk) link;
|
||||||
void *buf;
|
void *buf;
|
||||||
u_int32_t pte_start, pte_size;
|
u_int32_t pte_start, pte_size;
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,7 @@ struct emu_mem {
|
||||||
u_int8_t bmap[MAXPAGES / 8];
|
u_int8_t bmap[MAXPAGES / 8];
|
||||||
u_int32_t *ptb_pages;
|
u_int32_t *ptb_pages;
|
||||||
void *silent_page;
|
void *silent_page;
|
||||||
SLIST_HEAD(, emu_memblk) blocks;
|
SLIST_HEAD(, struct emu_memblk) blocks;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct emu_voice {
|
struct emu_voice {
|
||||||
|
|
|
@ -71,10 +71,10 @@ struct svr4_sockcache_entry {
|
||||||
struct sockaddr_un sock;/* Pathname for the socket */
|
struct sockaddr_un sock;/* Pathname for the socket */
|
||||||
dev_t dev; /* Device where the socket lives on */
|
dev_t dev; /* Device where the socket lives on */
|
||||||
ino_t ino; /* Inode where the socket lives on */
|
ino_t ino; /* Inode where the socket lives on */
|
||||||
TAILQ_ENTRY(svr4_sockcache_entry) entries;
|
TAILQ_ENTRY(struct svr4_sockcache_entry) entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
|
TAILQ_HEAD(svr4_sockcache_head, struct svr4_sockcache_entry) svr4_head;
|
||||||
|
|
||||||
/* Initialization flag (set/queried by svr4_mod LKM) */
|
/* Initialization flag (set/queried by svr4_mod LKM) */
|
||||||
int svr4_str_initialized = 0;
|
int svr4_str_initialized = 0;
|
||||||
|
|
|
@ -64,7 +64,7 @@ sc_clear_screen(scr_stat *scp)
|
||||||
|
|
||||||
/* terminal emulator manager routines */
|
/* terminal emulator manager routines */
|
||||||
|
|
||||||
static LIST_HEAD(, sc_term_sw) sc_term_list =
|
static LIST_HEAD(, struct sc_term_sw) sc_term_list =
|
||||||
LIST_HEAD_INITIALIZER(sc_term_list);
|
LIST_HEAD_INITIALIZER(sc_term_list);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -768,7 +768,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
return ENOIOCTL;
|
return ENOIOCTL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LIST_HEAD(, sc_renderer) sc_rndr_list =
|
static LIST_HEAD(, struct sc_renderer) sc_rndr_list =
|
||||||
LIST_HEAD_INITIALIZER(sc_rndr_list);
|
LIST_HEAD_INITIALIZER(sc_rndr_list);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -325,7 +325,7 @@ typedef void sc_term_notify_t(scr_stat *scp, int event);
|
||||||
typedef int sc_term_input_t(scr_stat *scp, int c, struct tty *tp);
|
typedef int sc_term_input_t(scr_stat *scp, int c, struct tty *tp);
|
||||||
|
|
||||||
typedef struct sc_term_sw {
|
typedef struct sc_term_sw {
|
||||||
LIST_ENTRY(sc_term_sw) link;
|
LIST_ENTRY(struct sc_term_sw) link;
|
||||||
char *te_name; /* name of the emulator */
|
char *te_name; /* name of the emulator */
|
||||||
char *te_desc; /* description */
|
char *te_desc; /* description */
|
||||||
char *te_renderer; /* matching renderer */
|
char *te_renderer; /* matching renderer */
|
||||||
|
@ -395,7 +395,7 @@ typedef struct sc_renderer {
|
||||||
char *name;
|
char *name;
|
||||||
int mode;
|
int mode;
|
||||||
sc_rndr_sw_t *rndrsw;
|
sc_rndr_sw_t *rndrsw;
|
||||||
LIST_ENTRY(sc_renderer) link;
|
LIST_ENTRY(struct sc_renderer) link;
|
||||||
} sc_renderer_t;
|
} sc_renderer_t;
|
||||||
|
|
||||||
extern struct linker_set scrndr_set;
|
extern struct linker_set scrndr_set;
|
||||||
|
|
|
@ -1103,12 +1103,12 @@ struct ti_type {
|
||||||
|
|
||||||
struct ti_mc_entry {
|
struct ti_mc_entry {
|
||||||
struct ether_addr mc_addr;
|
struct ether_addr mc_addr;
|
||||||
SLIST_ENTRY(ti_mc_entry) mc_entries;
|
SLIST_ENTRY(struct ti_mc_entry) mc_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ti_jpool_entry {
|
struct ti_jpool_entry {
|
||||||
int slot;
|
int slot;
|
||||||
SLIST_ENTRY(ti_jpool_entry) jpool_entries;
|
SLIST_ENTRY(struct ti_jpool_entry) jpool_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ti_softc {
|
struct ti_softc {
|
||||||
|
@ -1135,9 +1135,9 @@ struct ti_softc {
|
||||||
u_int16_t ti_std; /* current std ring head */
|
u_int16_t ti_std; /* current std ring head */
|
||||||
u_int16_t ti_mini; /* current mini ring head */
|
u_int16_t ti_mini; /* current mini ring head */
|
||||||
u_int16_t ti_jumbo; /* current jumo ring head */
|
u_int16_t ti_jumbo; /* current jumo ring head */
|
||||||
SLIST_HEAD(__ti_mchead, ti_mc_entry) ti_mc_listhead;
|
SLIST_HEAD(__ti_mchead, struct ti_mc_entry) ti_mc_listhead;
|
||||||
SLIST_HEAD(__ti_jfreehead, ti_jpool_entry) ti_jfree_listhead;
|
SLIST_HEAD(__ti_jfreehead, struct ti_jpool_entry) ti_jfree_listhead;
|
||||||
SLIST_HEAD(__ti_jinusehead, ti_jpool_entry) ti_jinuse_listhead;
|
SLIST_HEAD(__ti_jinusehead, struct ti_jpool_entry) ti_jinuse_listhead;
|
||||||
u_int32_t ti_stat_ticks;
|
u_int32_t ti_stat_ticks;
|
||||||
u_int32_t ti_rx_coal_ticks;
|
u_int32_t ti_rx_coal_ticks;
|
||||||
u_int32_t ti_tx_coal_ticks;
|
u_int32_t ti_tx_coal_ticks;
|
||||||
|
|
|
@ -51,7 +51,7 @@ typedef struct ohci_soft_td {
|
||||||
struct ohci_soft_td *nexttd; /* mirrors nexttd in TD */
|
struct ohci_soft_td *nexttd; /* mirrors nexttd in TD */
|
||||||
struct ohci_soft_td *dnext; /* next in done list */
|
struct ohci_soft_td *dnext; /* next in done list */
|
||||||
ohci_physaddr_t physaddr;
|
ohci_physaddr_t physaddr;
|
||||||
LIST_ENTRY(ohci_soft_td) hnext;
|
LIST_ENTRY(struct ohci_soft_td) hnext;
|
||||||
usbd_xfer_handle xfer;
|
usbd_xfer_handle xfer;
|
||||||
u_int16_t len;
|
u_int16_t len;
|
||||||
u_int16_t flags;
|
u_int16_t flags;
|
||||||
|
@ -97,7 +97,7 @@ typedef struct ohci_softc {
|
||||||
ohci_soft_ed_t *sc_ctrl_head;
|
ohci_soft_ed_t *sc_ctrl_head;
|
||||||
ohci_soft_ed_t *sc_bulk_head;
|
ohci_soft_ed_t *sc_bulk_head;
|
||||||
|
|
||||||
LIST_HEAD(, ohci_soft_td) sc_hash_tds[OHCI_HASH_SIZE];
|
LIST_HEAD(, struct ohci_soft_td) sc_hash_tds[OHCI_HASH_SIZE];
|
||||||
|
|
||||||
int sc_noport;
|
int sc_noport;
|
||||||
u_int8_t sc_addr; /* device address */
|
u_int8_t sc_addr; /* device address */
|
||||||
|
@ -107,7 +107,7 @@ typedef struct ohci_softc {
|
||||||
ohci_soft_td_t *sc_freetds;
|
ohci_soft_td_t *sc_freetds;
|
||||||
ohci_soft_itd_t *sc_freeitds;
|
ohci_soft_itd_t *sc_freeitds;
|
||||||
|
|
||||||
SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */
|
SIMPLEQ_HEAD(, struct usbd_xfer) sc_free_xfers; /* free xfers */
|
||||||
|
|
||||||
usbd_xfer_handle sc_intrxfer;
|
usbd_xfer_handle sc_intrxfer;
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ struct uhci_pipe {
|
||||||
* The uhci_intr_info free list can be global since they contain
|
* The uhci_intr_info free list can be global since they contain
|
||||||
* no dma specific data. The other free lists do.
|
* no dma specific data. The other free lists do.
|
||||||
*/
|
*/
|
||||||
LIST_HEAD(, uhci_intr_info) uhci_ii_free;
|
LIST_HEAD(, struct uhci_intr_info) uhci_ii_free;
|
||||||
|
|
||||||
Static void uhci_busreset __P((uhci_softc_t *));
|
Static void uhci_busreset __P((uhci_softc_t *));
|
||||||
Static usbd_status uhci_run __P((uhci_softc_t *, int run));
|
Static usbd_status uhci_run __P((uhci_softc_t *, int run));
|
||||||
|
|
|
@ -73,7 +73,7 @@ typedef struct uhci_intr_info {
|
||||||
usbd_xfer_handle xfer;
|
usbd_xfer_handle xfer;
|
||||||
uhci_soft_td_t *stdstart;
|
uhci_soft_td_t *stdstart;
|
||||||
uhci_soft_td_t *stdend;
|
uhci_soft_td_t *stdend;
|
||||||
LIST_ENTRY(uhci_intr_info) list;
|
LIST_ENTRY(struct uhci_intr_info) list;
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
struct callout_handle timeout_handle;
|
struct callout_handle timeout_handle;
|
||||||
#endif /* defined(__FreeBSD__) */
|
#endif /* defined(__FreeBSD__) */
|
||||||
|
@ -149,7 +149,7 @@ typedef struct uhci_softc {
|
||||||
uhci_soft_td_t *sc_freetds; /* TD free list */
|
uhci_soft_td_t *sc_freetds; /* TD free list */
|
||||||
uhci_soft_qh_t *sc_freeqhs; /* QH free list */
|
uhci_soft_qh_t *sc_freeqhs; /* QH free list */
|
||||||
|
|
||||||
SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */
|
SIMPLEQ_HEAD(, struct usbd_xfer) sc_free_xfers; /* free xfers */
|
||||||
|
|
||||||
u_int8_t sc_addr; /* device address */
|
u_int8_t sc_addr; /* device address */
|
||||||
u_int8_t sc_conf; /* device configuration */
|
u_int8_t sc_conf; /* device configuration */
|
||||||
|
@ -157,7 +157,7 @@ typedef struct uhci_softc {
|
||||||
char sc_isreset;
|
char sc_isreset;
|
||||||
char sc_suspend;
|
char sc_suspend;
|
||||||
|
|
||||||
LIST_HEAD(, uhci_intr_info) sc_intrhead;
|
LIST_HEAD(, struct uhci_intr_info) sc_intrhead;
|
||||||
|
|
||||||
/* Info for the root hub interrupt channel. */
|
/* Info for the root hub interrupt channel. */
|
||||||
int sc_ival; /* time between root hug intrs */
|
int sc_ival; /* time between root hug intrs */
|
||||||
|
|
|
@ -156,9 +156,9 @@ Static void usb_event_thread __P((void *));
|
||||||
#define USB_MAX_EVENTS 50
|
#define USB_MAX_EVENTS 50
|
||||||
struct usb_event_q {
|
struct usb_event_q {
|
||||||
struct usb_event ue;
|
struct usb_event ue;
|
||||||
SIMPLEQ_ENTRY(usb_event_q) next;
|
SIMPLEQ_ENTRY(struct usb_event_q) next;
|
||||||
};
|
};
|
||||||
Static SIMPLEQ_HEAD(, usb_event_q) usb_events =
|
Static SIMPLEQ_HEAD(, struct usb_event_q) usb_events =
|
||||||
SIMPLEQ_HEAD_INITIALIZER(usb_events);
|
SIMPLEQ_HEAD_INITIALIZER(usb_events);
|
||||||
Static int usb_nevents = 0;
|
Static int usb_nevents = 0;
|
||||||
Static struct selinfo usb_selevent;
|
Static struct selinfo usb_selevent;
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct usb_dma_block {
|
||||||
size_t size;
|
size_t size;
|
||||||
size_t align;
|
size_t align;
|
||||||
int fullblock;
|
int fullblock;
|
||||||
LIST_ENTRY(usb_dma_block) next;
|
LIST_ENTRY(struct usb_dma_block) next;
|
||||||
} usb_dma_block_t;
|
} usb_dma_block_t;
|
||||||
|
|
||||||
#define DMAADDR(dma, offset) ((dma)->block->segs[0].ds_addr + (dma)->offs + (offset))
|
#define DMAADDR(dma, offset) ((dma)->block->segs[0].ds_addr + (dma)->offs + (offset))
|
||||||
|
|
|
@ -146,7 +146,7 @@ struct usbd_interface {
|
||||||
int altindex;
|
int altindex;
|
||||||
struct usbd_endpoint *endpoints;
|
struct usbd_endpoint *endpoints;
|
||||||
void *priv;
|
void *priv;
|
||||||
LIST_HEAD(, usbd_pipe) pipes;
|
LIST_HEAD(, struct usbd_pipe) pipes;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct usbd_pipe {
|
struct usbd_pipe {
|
||||||
|
@ -155,8 +155,8 @@ struct usbd_pipe {
|
||||||
struct usbd_endpoint *endpoint;
|
struct usbd_endpoint *endpoint;
|
||||||
int refcnt;
|
int refcnt;
|
||||||
char running;
|
char running;
|
||||||
SIMPLEQ_HEAD(, usbd_xfer) queue;
|
SIMPLEQ_HEAD(, struct usbd_xfer) queue;
|
||||||
LIST_ENTRY(usbd_pipe) next;
|
LIST_ENTRY(struct usbd_pipe) next;
|
||||||
|
|
||||||
usbd_xfer_handle intrxfer; /* used for repeating requests */
|
usbd_xfer_handle intrxfer; /* used for repeating requests */
|
||||||
char repeat;
|
char repeat;
|
||||||
|
@ -194,7 +194,7 @@ struct usbd_xfer {
|
||||||
#define URQ_AUTO_DMABUF 0x10
|
#define URQ_AUTO_DMABUF 0x10
|
||||||
#define URQ_DEV_DMABUF 0x20
|
#define URQ_DEV_DMABUF 0x20
|
||||||
|
|
||||||
SIMPLEQ_ENTRY(usbd_xfer) next;
|
SIMPLEQ_ENTRY(struct usbd_xfer) next;
|
||||||
|
|
||||||
void *hcpriv; /* private use by the HC driver */
|
void *hcpriv; /* private use by the HC driver */
|
||||||
int hcprivint;
|
int hcprivint;
|
||||||
|
|
|
@ -137,10 +137,10 @@ struct vn_softc {
|
||||||
struct ucred *sc_cred; /* credentials */
|
struct ucred *sc_cred; /* credentials */
|
||||||
int sc_maxactive; /* max # of active requests */
|
int sc_maxactive; /* max # of active requests */
|
||||||
u_long sc_options; /* options */
|
u_long sc_options; /* options */
|
||||||
SLIST_ENTRY(vn_softc) sc_list;
|
SLIST_ENTRY(struct vn_softc) sc_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
static SLIST_HEAD(, vn_softc) vn_list;
|
static SLIST_HEAD(, struct vn_softc) vn_list;
|
||||||
|
|
||||||
/* sc_flags */
|
/* sc_flags */
|
||||||
#define VNF_INITED 0x01
|
#define VNF_INITED 0x01
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef enum {
|
||||||
} fdntype;
|
} fdntype;
|
||||||
|
|
||||||
struct fdescnode {
|
struct fdescnode {
|
||||||
LIST_ENTRY(fdescnode) fd_hash; /* Hash list */
|
LIST_ENTRY(struct fdescnode) fd_hash; /* Hash list */
|
||||||
struct vnode *fd_vnode; /* Back ptr to vnode */
|
struct vnode *fd_vnode; /* Back ptr to vnode */
|
||||||
fdntype fd_type; /* Type of this node */
|
fdntype fd_type; /* Type of this node */
|
||||||
unsigned fd_fd; /* Fd to be dup'ed */
|
unsigned fd_fd; /* Fd to be dup'ed */
|
||||||
|
|
|
@ -67,7 +67,7 @@ static vop_t **fdesc_vnodeop_p;
|
||||||
#define NFDCACHE 4
|
#define NFDCACHE 4
|
||||||
#define FD_NHASH(ix) \
|
#define FD_NHASH(ix) \
|
||||||
(&fdhashtbl[(ix) & fdhash])
|
(&fdhashtbl[(ix) & fdhash])
|
||||||
static LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
|
static LIST_HEAD(fdhashhead, struct fdescnode) *fdhashtbl;
|
||||||
static u_long fdhash;
|
static u_long fdhash;
|
||||||
|
|
||||||
static int fdesc_badop __P((void));
|
static int fdesc_badop __P((void));
|
||||||
|
|
|
@ -372,7 +372,7 @@ filt_fifordetach(struct knote *kn)
|
||||||
struct vnode *vn = (struct vnode *)kn->kn_fp->f_data;
|
struct vnode *vn = (struct vnode *)kn->kn_fp->f_data;
|
||||||
struct socket *so = (struct socket *)vn->v_fifoinfo->fi_readsock;
|
struct socket *so = (struct socket *)vn->v_fifoinfo->fi_readsock;
|
||||||
|
|
||||||
SLIST_REMOVE(&so->so_rcv.sb_sel.si_note, kn, knote, kn_selnext);
|
SLIST_REMOVE(&so->so_rcv.sb_sel.si_note, kn, struct knote, kn_selnext);
|
||||||
if (SLIST_EMPTY(&so->so_rcv.sb_sel.si_note))
|
if (SLIST_EMPTY(&so->so_rcv.sb_sel.si_note))
|
||||||
so->so_rcv.sb_flags &= ~SB_KNOTE;
|
so->so_rcv.sb_flags &= ~SB_KNOTE;
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ filt_fifowdetach(struct knote *kn)
|
||||||
struct vnode *vn = (struct vnode *)kn->kn_fp->f_data;
|
struct vnode *vn = (struct vnode *)kn->kn_fp->f_data;
|
||||||
struct socket *so = (struct socket *)vn->v_fifoinfo->fi_readsock;
|
struct socket *so = (struct socket *)vn->v_fifoinfo->fi_readsock;
|
||||||
|
|
||||||
SLIST_REMOVE(&so->so_snd.sb_sel.si_note, kn, knote, kn_selnext);
|
SLIST_REMOVE(&so->so_snd.sb_sel.si_note, kn, struct knote, kn_selnext);
|
||||||
if (SLIST_EMPTY(&so->so_snd.sb_sel.si_note))
|
if (SLIST_EMPTY(&so->so_snd.sb_sel.si_note))
|
||||||
so->so_snd.sb_flags &= ~SB_KNOTE;
|
so->so_snd.sb_flags &= ~SB_KNOTE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ struct hpfsnode {
|
||||||
struct simplelock h_interlock;
|
struct simplelock h_interlock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LIST_ENTRY(hpfsnode) h_hash;
|
LIST_ENTRY(struct hpfsnode) h_hash;
|
||||||
|
|
||||||
struct hpfsmount *h_hpmp;
|
struct hpfsmount *h_hpmp;
|
||||||
struct fnode h_fn;
|
struct fnode h_fn;
|
||||||
|
|
|
@ -50,7 +50,7 @@ MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
|
||||||
/*
|
/*
|
||||||
* Structures associated with hpfsnode cacheing.
|
* Structures associated with hpfsnode cacheing.
|
||||||
*/
|
*/
|
||||||
static LIST_HEAD(hphashhead, hpfsnode) *hpfs_hphashtbl;
|
static LIST_HEAD(hphashhead, struct hpfsnode) *hpfs_hphashtbl;
|
||||||
static u_long hpfs_hphash; /* size of hash table - 1 */
|
static u_long hpfs_hphash; /* size of hash table - 1 */
|
||||||
#define HPNOHASH(dev, lsn) (&hpfs_hphashtbl[(minor(dev) + (lsn)) & hpfs_hphash])
|
#define HPNOHASH(dev, lsn) (&hpfs_hphashtbl[(minor(dev) + (lsn)) & hpfs_hphash])
|
||||||
#ifndef NULL_SIMPLELOCKS
|
#ifndef NULL_SIMPLELOCKS
|
||||||
|
|
|
@ -54,7 +54,7 @@ MALLOC_DEFINE(M_NTFSNTHASH, "NTFS nthash", "NTFS ntnode hash tables");
|
||||||
/*
|
/*
|
||||||
* Structures associated with inode cacheing.
|
* Structures associated with inode cacheing.
|
||||||
*/
|
*/
|
||||||
static LIST_HEAD(nthashhead, ntnode) *ntfs_nthashtbl;
|
static LIST_HEAD(nthashhead, struct ntnode) *ntfs_nthashtbl;
|
||||||
static u_long ntfs_nthash; /* size of hash table - 1 */
|
static u_long ntfs_nthash; /* size of hash table - 1 */
|
||||||
#define NTNOHASH(device, inum) (&ntfs_nthashtbl[(minor(device) + (inum)) & ntfs_nthash])
|
#define NTNOHASH(device, inum) (&ntfs_nthashtbl[(minor(device) + (inum)) & ntfs_nthash])
|
||||||
#ifndef NULL_SIMPLELOCKS
|
#ifndef NULL_SIMPLELOCKS
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct ntnode {
|
||||||
struct vnode *i_devvp; /* vnode of blk dev we live on */
|
struct vnode *i_devvp; /* vnode of blk dev we live on */
|
||||||
dev_t i_dev; /* Device associated with the inode. */
|
dev_t i_dev; /* Device associated with the inode. */
|
||||||
|
|
||||||
LIST_ENTRY(ntnode) i_hash;
|
LIST_ENTRY(struct ntnode) i_hash;
|
||||||
struct ntnode *i_next;
|
struct ntnode *i_next;
|
||||||
struct ntnode **i_prev;
|
struct ntnode **i_prev;
|
||||||
struct ntfsmount *i_mp;
|
struct ntfsmount *i_mp;
|
||||||
|
@ -72,8 +72,8 @@ struct ntnode {
|
||||||
struct simplelock i_interlock;
|
struct simplelock i_interlock;
|
||||||
int i_usecount;
|
int i_usecount;
|
||||||
|
|
||||||
LIST_HEAD(,fnode) i_fnlist;
|
LIST_HEAD(, struct fnode) i_fnlist;
|
||||||
LIST_HEAD(,ntvattr) i_valist;
|
LIST_HEAD(, struct ntvattr) i_valist;
|
||||||
|
|
||||||
long i_nlink; /* MFR */
|
long i_nlink; /* MFR */
|
||||||
ino_t i_mainrec; /* MFR */
|
ino_t i_mainrec; /* MFR */
|
||||||
|
@ -88,7 +88,7 @@ struct fnode {
|
||||||
struct lock f_lock; /* fnode lock >Keep this first< */
|
struct lock f_lock; /* fnode lock >Keep this first< */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LIST_ENTRY(fnode) f_fnlist;
|
LIST_ENTRY(struct fnode) f_fnlist;
|
||||||
struct vnode *f_vp; /* Associatied vnode */
|
struct vnode *f_vp; /* Associatied vnode */
|
||||||
struct ntnode *f_ip; /* Associated ntnode */
|
struct ntnode *f_ip; /* Associated ntnode */
|
||||||
u_long f_flag;
|
u_long f_flag;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#define VA_PRELOADED 0x0002
|
#define VA_PRELOADED 0x0002
|
||||||
|
|
||||||
struct ntvattr {
|
struct ntvattr {
|
||||||
LIST_ENTRY(ntvattr) va_list;
|
LIST_ENTRY(struct ntvattr) va_list;
|
||||||
|
|
||||||
u_int32_t va_vflag;
|
u_int32_t va_vflag;
|
||||||
struct vnode *va_vp;
|
struct vnode *va_vp;
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct null_mount {
|
||||||
* A cache of vnode references
|
* A cache of vnode references
|
||||||
*/
|
*/
|
||||||
struct null_node {
|
struct null_node {
|
||||||
LIST_ENTRY(null_node) null_hash; /* Hash list */
|
LIST_ENTRY(struct null_node) null_hash; /* Hash list */
|
||||||
struct vnode *null_lowervp; /* VREFed once */
|
struct vnode *null_lowervp; /* VREFed once */
|
||||||
struct vnode *null_vnode; /* Back pointer */
|
struct vnode *null_vnode; /* Back pointer */
|
||||||
};
|
};
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
#define NULL_NHASH(vp) \
|
#define NULL_NHASH(vp) \
|
||||||
(&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash])
|
(&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash])
|
||||||
static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
|
static LIST_HEAD(null_node_hashhead, struct null_node) *null_node_hashtbl;
|
||||||
static u_long null_node_hash;
|
static u_long null_node_hash;
|
||||||
|
|
||||||
static int null_node_alloc __P((struct mount *mp, struct vnode *lowervp,
|
static int null_node_alloc __P((struct mount *mp, struct vnode *lowervp,
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
extern vop_t **nwfs_vnodeop_p;
|
extern vop_t **nwfs_vnodeop_p;
|
||||||
|
|
||||||
static LIST_HEAD(nwnode_hash_head,nwnode) *nwhashtbl;
|
static LIST_HEAD(nwnode_hash_head, struct nwnode) *nwhashtbl;
|
||||||
static u_long nwnodehash;
|
static u_long nwnodehash;
|
||||||
static int nwhashlock = 0;
|
static int nwhashlock = 0;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#define NVOLUME 0x0010 /* vnode references a volume */
|
#define NVOLUME 0x0010 /* vnode references a volume */
|
||||||
|
|
||||||
struct nwnode {
|
struct nwnode {
|
||||||
LIST_ENTRY(nwnode) n_hash;
|
LIST_ENTRY(struct nwnode) n_hash;
|
||||||
struct vnode *n_vnode;
|
struct vnode *n_vnode;
|
||||||
struct vattr n_vattr;
|
struct vattr n_vattr;
|
||||||
struct nwmount *n_mount;
|
struct nwmount *n_mount;
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct umap_mount {
|
||||||
* A cache of vnode references
|
* A cache of vnode references
|
||||||
*/
|
*/
|
||||||
struct umap_node {
|
struct umap_node {
|
||||||
LIST_ENTRY(umap_node) umap_hash; /* Hash list */
|
LIST_ENTRY(struct umap_node) umap_hash; /* Hash list */
|
||||||
struct vnode *umap_lowervp; /* Aliased vnode - VREFed once */
|
struct vnode *umap_lowervp; /* Aliased vnode - VREFed once */
|
||||||
struct vnode *umap_vnode; /* Back pointer to vnode/umap_node */
|
struct vnode *umap_vnode; /* Back pointer to vnode/umap_node */
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#define UMAP_NHASH(vp) \
|
#define UMAP_NHASH(vp) \
|
||||||
(&umap_node_hashtbl \
|
(&umap_node_hashtbl \
|
||||||
[((uintptr_t)(void *)(vp) >> LOG2_SIZEVNODE) & umap_node_hash])
|
[((uintptr_t)(void *)(vp) >> LOG2_SIZEVNODE) & umap_node_hash])
|
||||||
static LIST_HEAD(umap_node_hashhead, umap_node) *umap_node_hashtbl;
|
static LIST_HEAD(umap_node_hashhead, struct umap_node) *umap_node_hashtbl;
|
||||||
static u_long umap_node_hash;
|
static u_long umap_node_hash;
|
||||||
|
|
||||||
static u_long umap_findid __P((u_long id, u_long map[][2], int nentries));
|
static u_long umap_findid __P((u_long id, u_long map[][2], int nentries));
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct union_mount {
|
||||||
*/
|
*/
|
||||||
struct union_node {
|
struct union_node {
|
||||||
struct lock un_lock;
|
struct lock un_lock;
|
||||||
LIST_ENTRY(union_node) un_cache; /* Hash chain */
|
LIST_ENTRY(struct union_node) un_cache; /* Hash chain */
|
||||||
struct vnode *un_vnode; /* Back pointer */
|
struct vnode *un_vnode; /* Back pointer */
|
||||||
struct vnode *un_uppervp; /* overlaying object */
|
struct vnode *un_uppervp; /* overlaying object */
|
||||||
struct vnode *un_lowervp; /* underlying object */
|
struct vnode *un_lowervp; /* underlying object */
|
||||||
|
|
|
@ -67,7 +67,7 @@ extern int union_init __P((void));
|
||||||
#define UNION_HASH(u, l) \
|
#define UNION_HASH(u, l) \
|
||||||
(((((uintptr_t) (u)) + ((uintptr_t) l)) >> 8) & (NHASH-1))
|
(((((uintptr_t) (u)) + ((uintptr_t) l)) >> 8) & (NHASH-1))
|
||||||
|
|
||||||
static LIST_HEAD(unhead, union_node) unhead[NHASH];
|
static LIST_HEAD(unhead, struct union_node) unhead[NHASH];
|
||||||
static int unvplock[NHASH];
|
static int unvplock[NHASH];
|
||||||
|
|
||||||
static void union_dircache_r __P((struct vnode *vp, struct vnode ***vppp,
|
static void union_dircache_r __P((struct vnode *vp, struct vnode ***vppp,
|
||||||
|
|
|
@ -50,7 +50,7 @@ static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
|
||||||
/*
|
/*
|
||||||
* Structures associated with inode cacheing.
|
* Structures associated with inode cacheing.
|
||||||
*/
|
*/
|
||||||
static LIST_HEAD(ihashhead, inode) *ihashtbl;
|
static LIST_HEAD(ihashhead, struct inode) *ihashtbl;
|
||||||
static u_long ihash; /* size of hash table - 1 */
|
static u_long ihash; /* size of hash table - 1 */
|
||||||
#define INOHASH(device, inum) (&ihashtbl[(minor(device) + (inum)) & ihash])
|
#define INOHASH(device, inum) (&ihashtbl[(minor(device) + (inum)) & ihash])
|
||||||
#ifndef NULL_SIMPLELOCKS
|
#ifndef NULL_SIMPLELOCKS
|
||||||
|
|
|
@ -67,7 +67,7 @@ typedef long ufs_lbn_t;
|
||||||
*/
|
*/
|
||||||
struct inode {
|
struct inode {
|
||||||
struct lock i_lock; /* Inode lock. >Keep this first< */
|
struct lock i_lock; /* Inode lock. >Keep this first< */
|
||||||
LIST_ENTRY(inode) i_hash;/* Hash chain. */
|
LIST_ENTRY(struct inode) i_hash;/* Hash chain. */
|
||||||
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
||||||
struct vnode *i_devvp;/* Vnode for block I/O. */
|
struct vnode *i_devvp;/* Vnode for block I/O. */
|
||||||
u_int32_t i_flag; /* flags, see below */
|
u_int32_t i_flag; /* flags, see below */
|
||||||
|
|
|
@ -67,7 +67,7 @@ typedef long ufs_lbn_t;
|
||||||
*/
|
*/
|
||||||
struct inode {
|
struct inode {
|
||||||
struct lock i_lock; /* Inode lock. >Keep this first< */
|
struct lock i_lock; /* Inode lock. >Keep this first< */
|
||||||
LIST_ENTRY(inode) i_hash;/* Hash chain. */
|
LIST_ENTRY(struct inode) i_hash;/* Hash chain. */
|
||||||
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
||||||
struct vnode *i_devvp;/* Vnode for block I/O. */
|
struct vnode *i_devvp;/* Vnode for block I/O. */
|
||||||
u_int32_t i_flag; /* flags, see below */
|
u_int32_t i_flag; /* flags, see below */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue