MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kdb_thr_next

Function kdb_thr_next

freebsd/kern/subr_kdb.c:644–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644struct thread *
645kdb_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
668int
669kdb_thr_select(struct thread *thr)

Callers 4

kdb_thr_lookupFunction · 0.85
db_findstack_cmdFunction · 0.85
db_show_threadsFunction · 0.85
_db_stack_trace_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected