diff options
| author | Anders Persson <Anders.Persson@Sun.COM> | 2009-05-04 12:55:57 -0700 |
|---|---|---|
| committer | Anders Persson <Anders.Persson@Sun.COM> | 2009-05-04 12:55:57 -0700 |
| commit | f3124163ff308d38b77c6099323e42484176988e (patch) | |
| tree | 6c291b6a58c0183a39e88467b15e8f3bdc27eb92 /usr/src/uts/common/inet/squeue.c | |
| parent | b277c5a6ff3dbd12b9ecf0adcf3320d5f6dc1175 (diff) | |
| download | illumos-joyent-f3124163ff308d38b77c6099323e42484176988e.tar.gz | |
6831864 tcp loopback is not flow controlled when fusion is used
6834277 random streams options can be set with garbage
6836584 squeue_synch_enter() and squeue_synch_exit() are lint-unfriendly
Diffstat (limited to 'usr/src/uts/common/inet/squeue.c')
| -rw-r--r-- | usr/src/uts/common/inet/squeue.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/usr/src/uts/common/inet/squeue.c b/usr/src/uts/common/inet/squeue.c index 396068a2d9..8d2d83d966 100644 --- a/usr/src/uts/common/inet/squeue.c +++ b/usr/src/uts/common/inet/squeue.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1273,12 +1273,9 @@ squeue_wakeup_conn(void *arg, mblk_t *mp, void *arg2) mutex_exit(&sqp->sq_lock); } -/* ARGSUSED */ int -squeue_synch_enter(squeue_t *sqp, void *arg, uint8_t tag) +squeue_synch_enter(squeue_t *sqp, conn_t *connp, mblk_t *use_mp) { - conn_t *connp = (conn_t *)arg; - mutex_enter(&sqp->sq_lock); if (sqp->sq_first == NULL && !(sqp->sq_state & SQS_PROC)) { /* @@ -1304,7 +1301,7 @@ squeue_synch_enter(squeue_t *sqp, void *arg, uint8_t tag) } else { mblk_t *mp; - mp = allocb(0, BPRI_MED); + mp = (use_mp == NULL) ? allocb(0, BPRI_MED) : use_mp; if (mp == NULL) { mutex_exit(&sqp->sq_lock); return (ENOMEM); @@ -1329,18 +1326,16 @@ squeue_synch_enter(squeue_t *sqp, void *arg, uint8_t tag) cv_wait(&connp->conn_sq_cv, &sqp->sq_lock); mutex_exit(&sqp->sq_lock); - freeb(mp); + if (use_mp == NULL) + freeb(mp); return (0); } } -/* ARGSUSED */ void -squeue_synch_exit(squeue_t *sqp, void *arg) +squeue_synch_exit(squeue_t *sqp, conn_t *connp) { - conn_t *connp = (conn_t *)arg; - mutex_enter(&sqp->sq_lock); if (sqp->sq_run == curthread) { ASSERT(sqp->sq_state & SQS_PROC); |
