Lines Matching defs:sq

188 	squeue_t	**lastsqp, *sq;
236 sq = *defaultq_lastp;
237 *defaultq_lastp = sq->sq_next;
238 sq->sq_next = NULL;
239 if (!(sq->sq_state & SQS_DEFAULT)) {
240 mutex_enter(&sq->sq_lock);
241 sq->sq_state |= SQS_DEFAULT;
242 mutex_exit(&sq->sq_lock);
245 sq = ip_squeue_create(SQUEUE_DEFAULT_PRIORITY);
246 sq->sq_state |= SQS_DEFAULT;
249 sq->sq_set = sqs;
250 sqs->sqs_default = sq;
251 squeue_bind(sq, id); /* this locks squeue mutex */
267 squeue_t *sq;
270 for (sq = sqs->sqs_head; sq != NULL; sq = sq->sq_next) {
275 if (!(sq->sq_state & (SQS_DEFAULT | SQS_ILL_BOUND)))
279 if (sq == NULL) {
280 sq = ip_squeue_create(pri);
281 sq->sq_set = sqs;
282 sq->sq_next = sqs->sqs_head;
283 sqs->sqs_head = sq;
286 ASSERT(!(sq->sq_state & (SQS_POLL_THR_CONTROL | SQS_WORKER_THR_CONTROL |
290 mutex_enter(&sq->sq_lock);
291 sq->sq_state |= SQS_ILL_BOUND;
292 mutex_exit(&sq->sq_lock);
295 if (sq->sq_priority != pri) {
296 thread_lock(sq->sq_worker);
297 (void) thread_change_pri(sq->sq_worker, pri, 0);
298 thread_unlock(sq->sq_worker);
300 thread_lock(sq->sq_poll_thr);
301 (void) thread_change_pri(sq->sq_poll_thr, pri, 0);
302 thread_unlock(sq->sq_poll_thr);
304 sq->sq_priority = pri;
306 return (sq);
359 squeue_t *sq;
381 sq = sqs->sqs_default;
384 ASSERT(sq);
385 return (sq);
394 ip_squeue_set_move(squeue_t *sq, squeue_set_t *newset)
400 ASSERT(!(sq->sq_state & SQS_DEFAULT));
401 ASSERT(!MUTEX_HELD(&sq->sq_lock));
404 set = sq->sq_set;
409 while (*lastsqp != sq)
412 *lastsqp = sq->sq_next;
413 sq->sq_next = newset->sqs_head;
414 newset->sqs_head = sq;
415 sq->sq_set = newset;
417 squeue_unbind(sq);
419 squeue_bind(sq, cpuid);
427 ip_squeue_cpu_move(squeue_t *sq, processorid_t cpuid)
432 if (sq->sq_state & SQS_DEFAULT)
444 ip_squeue_set_move(sq, set);
478 squeue_t *sq = NULL;
524 sq = ip_squeue_getfree(pri);
526 mutex_enter(&sq->sq_lock);
527 sq->sq_rx_ring = rx_ring;
528 rx_ring->rr_sqp = sq;
530 sq->sq_state |= SQS_POLL_CAPAB;
533 sq->sq_ill = ill;
534 mutex_exit(&sq->sq_lock);