diff options
author | Alexander Motin <mav@FreeBSD.org> | 2014-06-08 09:40:26 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2014-06-08 09:40:26 +0000 |
commit | b776fb2d671a78806536ffa82646969af93d0270 (patch) | |
tree | 649ba977a4e006579b01fdb75fef67caed842b83 /sys/rpc/svc.h | |
parent | 45b4fb04493fb2e82eafc6b1f543f2edd572ba59 (diff) | |
download | src-b776fb2d671a78806536ffa82646969af93d0270.tar.gz src-b776fb2d671a78806536ffa82646969af93d0270.zip |
Introduce new per-thread lock to protect the list of requests.
This allows to slightly simplify svc_run_internal() code: if we processed
all the requests in a queue, then we know that new one will not appear.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=267221
Diffstat (limited to 'sys/rpc/svc.h')
-rw-r--r-- | sys/rpc/svc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index a7f5f5126933..108c3b1197d1 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -291,6 +291,7 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct mtx_padalign st_lock; /* protects st_reqs field */ struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ |