FreeBSD/sys/kern/sched_ule.c
/*
 * Print the threads waiting on a run-queue.
 */
Print the threads waiting on a run-queue.
Print the threads waiting on a run - queue .
static void
runq_print(struct runq *rq)
{
	struct rqhead *rqh;
	struct thread *td;
	int pri;
	int j;
	int i;
	for (i = 0; i < RQB_LEN; i++) {
		printf("\t\trunq bits %d 0x%zx\n",
		    i, rq->rq_status.rqb_bits[i]);
		for (j = 0; j < RQB_BPW; j++)
			if (rq->rq_status.rqb_bits[i] & (1ul << j)) {
				pri = j + (i << RQB_L2BPW);
				rqh = &rq->rq_queues[pri];
				TAILQ_FOREACH(td, rqh, td_runq) {
					printf("\t\t\ttd %p(%s) priority %d rqindex %d pri %d\n",
					    td, td->td_name, td->td_priority,
					    td->td_rqindex, pri);
				}
			}
	}
}
static void runq_print ( struct runq * rq ) { struct rqhead * rqh ; struct thread * td ; int pri ; int j ; int i ; for ( i = 0 ; i < RQB_LEN ; i ++ ) { printf ( " \t \t \n " , i , rq -> rq_status . rqb_bits [ i ] ) ; for ( j = 0 ; j < RQB_BPW ; j ++ ) if ( rq -> rq_status . rqb_bits [ i ] & ( 1ul << j ) ) { pri = j + ( i << RQB_L2BPW ) ; rqh = & rq -> rq_queues [ pri ] ; TAILQ_FOREACH ( td , rqh , td_runq ) { printf ( " \t \t \t \n " , td , td -> td_name , td -> td_priority , td -> td_rqindex , pri ) ; } } } }
Print the threads waiting on a run-queue.
Print the threads waiting on a run - queue .