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

Function kdb_thr_ctx

freebsd/kern/subr_kdb.c:584–602  ·  view source on GitHub ↗

* Thread-related support functions. */

Source from the content-addressed store, hash-verified

582 * Thread-related support functions.
583 */
584struct pcb *
585kdb_thr_ctx(struct thread *thr)
586{
587#if defined(SMP) && defined(KDB_STOPPEDPCB)
588 struct pcpu *pc;
589#endif
590
591 if (thr == curthread)
592 return (&kdb_pcb);
593
594#if defined(SMP) && defined(KDB_STOPPEDPCB)
595 STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) {
596 if (pc->pc_curthread == thr &&
597 CPU_ISSET(pc->pc_cpuid, &stopped_cpus))
598 return (KDB_STOPPEDPCB(pc));
599 }
600#endif
601 return (thr->td_pcb);
602}
603
604struct thread *
605kdb_thr_first(void)

Callers 6

db_trace_threadFunction · 0.85
db_trace_threadFunction · 0.85
db_trace_threadFunction · 0.85
db_trace_threadFunction · 0.85
db_trace_threadFunction · 0.85
kdb_thr_selectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected