MFC r275618:
Check for stop condition in nfsd threads.
This commit is contained in:
parent
7ad7084d8f
commit
1eabc00156
@ -1101,6 +1101,7 @@ svc_run_internal(SVCGROUP *grp, bool_t ismaster)
|
||||
SVCXPRT *xprt;
|
||||
enum xprt_stat stat;
|
||||
struct svc_req *rqstp;
|
||||
struct proc *p;
|
||||
size_t sz;
|
||||
int error;
|
||||
|
||||
@ -1183,11 +1184,22 @@ svc_run_internal(SVCGROUP *grp, bool_t ismaster)
|
||||
> grp->sg_minthreads)
|
||||
&& !st->st_xprt)
|
||||
break;
|
||||
} else if (error) {
|
||||
} else if (error != 0) {
|
||||
KASSERT(error == EINTR || error == ERESTART,
|
||||
("non-signal error %d", error));
|
||||
mtx_unlock(&grp->sg_lock);
|
||||
svc_exit(pool);
|
||||
mtx_lock(&grp->sg_lock);
|
||||
break;
|
||||
p = curproc;
|
||||
PROC_LOCK(p);
|
||||
if (P_SHOULDSTOP(p)) {
|
||||
thread_suspend_check(0);
|
||||
PROC_UNLOCK(p);
|
||||
mtx_lock(&grp->sg_lock);
|
||||
} else {
|
||||
PROC_UNLOCK(p);
|
||||
svc_exit(pool);
|
||||
mtx_lock(&grp->sg_lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user