Lines Matching refs:sq

3754 	syncq_t		*sq;  in rwnext()  local
3801 sq = qp->q_syncq; in rwnext()
3802 mutex_enter(SQLOCK(sq)); in rwnext()
3804 count = sq->sq_count; in rwnext()
3805 flags = sq->sq_flags; in rwnext()
3806 ASSERT(sq->sq_ciputctrl == NULL || (flags & SQ_CIPUT)); in rwnext()
3813 mutex_exit(SQLOCK(sq)); in rwnext()
3821 sq->sq_flags = flags | SQ_WANTWAKEUP; in rwnext()
3822 cv_wait(&sq->sq_wait, SQLOCK(sq)); in rwnext()
3823 count = sq->sq_count; in rwnext()
3824 flags = sq->sq_flags; in rwnext()
3833 mutex_exit(SQLOCK(sq)); in rwnext()
3838 sq->sq_flags = flags | SQ_EXCL; in rwnext()
3839 sq->sq_count = count + 1; in rwnext()
3840 ASSERT(sq->sq_count != 0); /* Wraparound */ in rwnext()
3849 mutex_exit(SQLOCK(sq)); in rwnext()
3881 mutex_enter(SQLOCK(sq)); in rwnext()
3882 flags = sq->sq_flags; in rwnext()
3883 ASSERT(sq->sq_count != 0); in rwnext()
3884 sq->sq_count--; in rwnext()
3886 putnext_tail(sq, qp, flags); in rwnext()
3918 sq->sq_flags = flags & ~SQ_EXCL; in rwnext()
3919 if (sq->sq_flags & SQ_WANTWAKEUP) { in rwnext()
3920 sq->sq_flags &= ~SQ_WANTWAKEUP; in rwnext()
3921 cv_broadcast(&sq->sq_wait); in rwnext()
3923 mutex_exit(SQLOCK(sq)); in rwnext()
3942 syncq_t *sq; in infonext() local
3966 sq = qp->q_syncq; in infonext()
3967 mutex_enter(SQLOCK(sq)); in infonext()
3969 count = sq->sq_count; in infonext()
3970 flags = sq->sq_flags; in infonext()
3971 ASSERT(sq->sq_ciputctrl == NULL || (flags & SQ_CIPUT)); in infonext()
3977 sq->sq_flags = flags | SQ_WANTWAKEUP; in infonext()
3978 cv_wait(&sq->sq_wait, SQLOCK(sq)); in infonext()
3979 count = sq->sq_count; in infonext()
3980 flags = sq->sq_flags; in infonext()
3984 sq->sq_flags = flags | SQ_EXCL; in infonext()
3985 sq->sq_count = count + 1; in infonext()
3986 ASSERT(sq->sq_count != 0); /* Wraparound */ in infonext()
3987 mutex_exit(SQLOCK(sq)); in infonext()
3991 mutex_enter(SQLOCK(sq)); in infonext()
3992 flags = sq->sq_flags; in infonext()
3993 ASSERT(sq->sq_count != 0); in infonext()
3994 sq->sq_count--; in infonext()
3996 putnext_tail(sq, qp, flags); in infonext()
4035 sq->sq_flags = flags & ~SQ_EXCL; in infonext()
4036 mutex_exit(SQLOCK(sq)); in infonext()
4064 syncq_t *sq = q->q_syncq; in create_syncq_putlocks() local
4068 ASSERT(sq != NULL); in create_syncq_putlocks()
4074 if (!(sq->sq_type & SQ_CIPUT)) in create_syncq_putlocks()
4078 if (sq->sq_ciputctrl == NULL) { in create_syncq_putlocks()
4081 mutex_enter(SQLOCK(sq)); in create_syncq_putlocks()
4082 if (sq->sq_ciputctrl != NULL) { in create_syncq_putlocks()
4083 mutex_exit(SQLOCK(sq)); in create_syncq_putlocks()
4086 ASSERT(sq->sq_nciputctrl == 0); in create_syncq_putlocks()
4087 sq->sq_nciputctrl = n_ciputctrl - 1; in create_syncq_putlocks()
4095 sq->sq_ciputctrl = cip; in create_syncq_putlocks()
4096 mutex_exit(SQLOCK(sq)); in create_syncq_putlocks()
4099 ASSERT(sq->sq_nciputctrl == n_ciputctrl - 1); in create_syncq_putlocks()
4104 ASSERT(sq == q->q_syncq); in create_syncq_putlocks()
4108 ASSERT(sq != q->q_syncq); in create_syncq_putlocks()
4109 sq = q->q_syncq; in create_syncq_putlocks()
4110 ASSERT(sq->sq_type & SQ_CIPUT); in create_syncq_putlocks()