| 642 | } |
| 643 | |
| 644 | struct thread * |
| 645 | kdb_thr_next(struct thread *thr) |
| 646 | { |
| 647 | struct proc *p; |
| 648 | u_int hash; |
| 649 | |
| 650 | p = thr->td_proc; |
| 651 | thr = TAILQ_NEXT(thr, td_plist); |
| 652 | if (thr != NULL) |
| 653 | return (thr); |
| 654 | hash = p->p_pid & pidhash; |
| 655 | for (;;) { |
| 656 | p = LIST_NEXT(p, p_hash); |
| 657 | while (p == NULL) { |
| 658 | if (++hash > pidhash) |
| 659 | return (NULL); |
| 660 | p = LIST_FIRST(&pidhashtbl[hash]); |
| 661 | } |
| 662 | thr = FIRST_THREAD_IN_PROC(p); |
| 663 | if (thr != NULL) |
| 664 | return (thr); |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | int |
| 669 | kdb_thr_select(struct thread *thr) |
no outgoing calls
no test coverage detected