diff options
author | mav <mav@FreeBSD.org> | 2014-06-22 18:02:39 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-06-22 18:02:39 +0000 |
commit | 1d8eae9d0a71314b260971ff1d920c6685a0b2a4 (patch) | |
tree | adf36ab6efe8480f59fd5b516d141f6939d30ee3 /sys/rpc | |
parent | ad4e5fe06bf26964cbf5e3e5a1d6a6d85c9067c2 (diff) | |
download | FreeBSD-src-1d8eae9d0a71314b260971ff1d920c6685a0b2a4.zip FreeBSD-src-1d8eae9d0a71314b260971ff1d920c6685a0b2a4.tar.gz |
MFC r267223:
Remove st_idle variable, duplicating st_xprt.
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/svc.c | 6 | ||||
-rw-r--r-- | sys/rpc/svc.h | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 9803e02..5062a84 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -340,7 +340,6 @@ xprt_assignthread(SVCXPRT *xprt) st = LIST_FIRST(&pool->sp_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; @@ -1138,7 +1137,6 @@ svc_run_internal(SVCPOOL *pool, bool_t ismaster) } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1146,10 +1144,8 @@ svc_run_internal(SVCPOOL *pool, bool_t ismaster) else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - if (st->st_idle) { + if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; - } /* * Reduce worker thread count when idle. diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index 108c3b1..d16cf30 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -295,7 +295,6 @@ typedef struct __rpc_svcthread { struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ |