diff options
author | phk <phk@FreeBSD.org> | 1994-10-17 17:47:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-17 17:47:45 +0000 |
commit | 071d10f334b2e0094018c4b2027c8e3e73833bc1 (patch) | |
tree | c5905f4096b68df87a3f00435bec4fcc08408b18 /sys/nfs/nqnfs.h | |
parent | 24ec594f4ae8189490a0087923fc655e16dde331 (diff) | |
download | FreeBSD-src-071d10f334b2e0094018c4b2027c8e3e73833bc1.zip FreeBSD-src-071d10f334b2e0094018c4b2027c8e3e73833bc1.tar.gz |
This is a bunch of changes from NetBSD. There are a couple of bug-fixes.
But mostly it is changes to use the list-maintenance macros instead of
doing the pointer-gymnastics by hand.
Obtained from: NetBSD
Diffstat (limited to 'sys/nfs/nqnfs.h')
-rw-r--r-- | sys/nfs/nqnfs.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/nfs/nqnfs.h b/sys/nfs/nqnfs.h index 18f242a..0f8f12b 100644 --- a/sys/nfs/nqnfs.h +++ b/sys/nfs/nqnfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nqnfs.h 8.1 (Berkeley) 6/10/93 - * $Id: nqnfs.h,v 1.4 1994/09/22 22:10:45 wollman Exp $ + * $Id: nqnfs.h,v 1.5 1994/10/02 17:27:07 phk Exp $ */ #ifndef _NFS_NQNFS_H_ @@ -66,6 +66,9 @@ * RAM on the server. The default definitions below assume that NOVRAM is not * available. */ +#ifdef HASNVRAM +# undef HASNVRAM +#endif #define NQSTORENOVRAM(t) #define NQLOADNOVRAM(t) @@ -109,9 +112,8 @@ struct nqhost { #define lph_slp lph_un.un_conn.conn_slp struct nqlease { - struct nqlease *lc_chain1[2]; /* Timer queue list (must be first) */ - struct nqlease *lc_fhnext; /* Fhandle hash list */ - struct nqlease **lc_fhprev; + LIST_ENTRY(nqlease) lc_hash; /* Fhandle hash list */ + CIRCLEQ_ENTRY(nqlease) lc_timer; /* Timer queue list */ time_t lc_expiry; /* Expiry time (sec) */ struct nqhost lc_host; /* Host that got lease */ struct nqm *lc_morehosts; /* Other hosts that share read lease */ @@ -187,12 +189,15 @@ struct nqm { /* * List head for timer queue. */ -extern union nqsrvthead { - union nqsrvthead *th_head[2]; - struct nqlease *th_chain[2]; -} nqthead; -extern struct nqlease **nqfhead; -extern u_long nqfheadhash; +CIRCLEQ_HEAD(, nqlease) nqtimerhead; + +/* + * List head for the file handle hash table. + */ +#define NQFHHASH(f) \ + (&nqfhhashtbl[(*((u_long *)(f))) & nqfhhash]) +LIST_HEAD(nqfhhashhead, nqlease) *nqfhhashtbl; +u_long nqfhhash; /* * Nqnfs return status numbers. |