diff options
| author | micheng <none@none> | 2005-07-26 01:08:29 -0700 |
|---|---|---|
| committer | micheng <none@none> | 2005-07-26 01:08:29 -0700 |
| commit | 116094b26dbf4a03272e56a5d8b6378a087ad9d2 (patch) | |
| tree | cb26d2bf917a125ac4954f35777cba7e8f2180cb /usr/src/uts/common/os/strsubr.c | |
| parent | ba88735c5364a42733636458ae04c3f1ac5f2f88 (diff) | |
| download | illumos-joyent-116094b26dbf4a03272e56a5d8b6378a087ad9d2.tar.gz | |
6233064 svc.startd is wedged trying to talk to the system console
6270710 -1 for backenable is not correct
Diffstat (limited to 'usr/src/uts/common/os/strsubr.c')
| -rw-r--r-- | usr/src/uts/common/os/strsubr.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/usr/src/uts/common/os/strsubr.c b/usr/src/uts/common/os/strsubr.c index c37fab366c..b3826021d3 100644 --- a/usr/src/uts/common/os/strsubr.c +++ b/usr/src/uts/common/os/strsubr.c @@ -287,6 +287,7 @@ static void runbufcalls(void); static void sqenable(syncq_t *); static void sqfill_events(syncq_t *, queue_t *, mblk_t *, void (*)()); static void wait_q_syncq(queue_t *); +static void backenable_insertedq(queue_t *); static void queue_service(queue_t *); static void stream_service(stdata_t *); @@ -4037,7 +4038,7 @@ strctty(stdata_t *stp) * Use pri == -1 to avoid the setqback */ void -backenable(queue_t *q, int pri) +backenable(queue_t *q, uchar_t pri) { queue_t *nq; @@ -4074,8 +4075,7 @@ backenable(queue_t *q, int pri) ASSERT(MUTEX_HELD(QLOCK(nq))); } #endif - if (pri != -1) - setqback(nq, pri); + setqback(nq, pri); qenable_locked(nq); if (freezer != curthread) mutex_exit(QLOCK(nq)); @@ -4534,6 +4534,28 @@ strunlock(struct stdata *stp, sqlist_t *sqlist) } } +/* + * When the module has service procedure, we need check if the next + * module which has service procedure is in flow control to trigger + * the backenable. + */ +static void +backenable_insertedq(queue_t *q) +{ + qband_t *qbp; + + claimstr(q); + if (q->q_qinfo->qi_srvp != NULL && q->q_next != NULL) { + if (q->q_next->q_nfsrv->q_flag & QWANTW) + backenable(q, 0); + + qbp = q->q_next->q_nfsrv->q_bandp; + for (; qbp != NULL; qbp = qbp->qb_next) + if ((qbp->qb_flag & QB_WANTW) && qbp->qb_first != NULL) + backenable(q, qbp->qb_first->b_band); + } + releasestr(q); +} /* * Given two read queues, insert a new single one after another. @@ -4615,6 +4637,12 @@ insertq(struct stdata *stp, queue_t *new) stp->sd_pushcnt++; strunlock(stp, NULL); + + /* check if the write Q needs backenable */ + backenable_insertedq(wnew); + + /* check if the read Q needs backenable */ + backenable_insertedq(new); } /* |
