diff options
author | mav <mav@FreeBSD.org> | 2014-06-08 10:18:22 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-06-08 10:18:22 +0000 |
commit | c73f36ad0d93d806a2c6cb1231ea07d1924ed08e (patch) | |
tree | 98f1aec2ece5efb6f418cd09a5d1c68f892e032f | |
parent | aa54e738fe2ad03844beb77d1e655206c829d0f3 (diff) | |
download | FreeBSD-src-c73f36ad0d93d806a2c6cb1231ea07d1924ed08e.zip FreeBSD-src-c73f36ad0d93d806a2c6cb1231ea07d1924ed08e.tar.gz |
Remove st_idle variable, duplicating st_xprt.
MFC after: 2 weeks
-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 c62f5e7..b7c8c57 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 */ |