summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2009-05-21 01:14:12 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2009-05-21 01:14:12 +0000
commit596c08801d91a8bc75614bbf5e059439c0e8c31c (patch)
treec95f66b1841efd82eddae7c0029366723144b73d
parent8d2dd5dd85cd6e9aa0e51054c23ac5f2d4109b18 (diff)
Notes
-rw-r--r--sys/nlm/nlm.h5
-rw-r--r--sys/nlm/nlm_prot_impl.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/sys/nlm/nlm.h b/sys/nlm/nlm.h
index 27b921fa5cec..d2c5ee1610a5 100644
--- a/sys/nlm/nlm.h
+++ b/sys/nlm/nlm.h
@@ -210,6 +210,11 @@ struct vop_reclaim_args;
extern int nlm_advlock(struct vop_advlock_args *ap);
extern int nlm_reclaim(struct vop_reclaim_args *ap);
+/*
+ * Acquire the next sysid for remote locks not handled by the NLM.
+ */
+extern uint32_t nlm_acquire_next_sysid(void);
+
#endif
#endif
diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c
index a46d4327b0b0..6ee6baa282ac 100644
--- a/sys/nlm/nlm_prot_impl.c
+++ b/sys/nlm/nlm_prot_impl.c
@@ -835,6 +835,20 @@ nlm_create_host(const char* caller_name)
}
/*
+ * Acquire the next sysid for remote locks not handled by the NLM.
+ */
+uint32_t
+nlm_acquire_next_sysid(void)
+{
+ uint32_t next_sysid;
+
+ mtx_lock(&nlm_global_lock);
+ next_sysid = nlm_next_sysid++;
+ mtx_unlock(&nlm_global_lock);
+ return (next_sysid);
+}
+
+/*
* Return non-zero if the address parts of the two sockaddrs are the
* same.
*/