aboutsummaryrefslogtreecommitdiff
path: root/sys/nfs/nqnfs.h
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-10-17 17:47:45 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-10-17 17:47:45 +0000
commit6ae324074ae50984e852f8b7b7f5c944120eb110 (patch)
treec5905f4096b68df87a3f00435bec4fcc08408b18 /sys/nfs/nqnfs.h
parent5ffce483b4c357f2a6fb32d7c603ffce7ac9c331 (diff)
downloadsrc-6ae324074ae50984e852f8b7b7f5c944120eb110.tar.gz
src-6ae324074ae50984e852f8b7b7f5c944120eb110.zip
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
Notes
Notes: svn path=/head/; revision=3664
Diffstat (limited to 'sys/nfs/nqnfs.h')
-rw-r--r--sys/nfs/nqnfs.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/nfs/nqnfs.h b/sys/nfs/nqnfs.h
index 18f242a3fe9a..0f8f12b238dc 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.