summaryrefslogtreecommitdiffstats
path: root/sys/rpc/svc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/rpc/svc.c')
-rw-r--r--sys/rpc/svc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c
index 96d011a..f63300d 100644
--- a/sys/rpc/svc.c
+++ b/sys/rpc/svc.c
@@ -406,6 +406,19 @@ xprt_inactive(SVCXPRT *xprt)
}
/*
+ * Variant of xprt_inactive() for use only when sure that port is
+ * assigned to thread. For example, withing receive handlers.
+ */
+void
+xprt_inactive_self(SVCXPRT *xprt)
+{
+
+ KASSERT(xprt->xp_thread != NULL,
+ ("xprt_inactive_self(%p) with NULL xp_thread", xprt));
+ xprt->xp_active = FALSE;
+}
+
+/*
* Add a service program to the callout list.
* The dispatch routine will be called when a rpc request for this
* program number comes in.
OpenPOWER on IntegriCloud