Date: Sun, 13 Jun 2004 05:55:42 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54791 for review Message-ID: <200406130555.i5D5tgsl033738@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54791 Change 54791 by marcel@marcel_nfs on 2004/06/13 05:54:59 o Add kdb_thr_ctx(), which given a struct thread returns the threads context (=PCB). Affected files ... .. //depot/projects/gdb/sys/kern/subr_kdb.c#15 edit .. //depot/projects/gdb/sys/sys/kdb.h#12 edit Differences ... ==== //depot/projects/gdb/sys/kern/subr_kdb.c#15 (text+ko) ==== @@ -277,6 +277,12 @@ * Thread related support functions. */ +struct pcb * +kdb_thr_ctx(struct thread *thr) +{ + return ((thr == curthread) ? &kdb_pcb : thr->td_pcb); +} + struct thread * kdb_thr_first(void) { @@ -329,7 +335,7 @@ if (thr == NULL) return (EINVAL); kdb_thread = thr; - kdb_thrctx = (thr == curthread) ? &kdb_pcb : thr->td_pcb; + kdb_thrctx = kdb_thr_ctx(thr); return (0); } ==== //depot/projects/gdb/sys/sys/kdb.h#12 (text+ko) ==== @@ -68,6 +68,7 @@ void kdb_init(void); void * kdb_jmpbuf(jmp_buf); void kdb_reenter(void); +struct pcb *kdb_thr_ctx(struct thread *); struct thread *kdb_thr_first(void); struct thread *kdb_thr_lookup(pid_t); struct thread *kdb_thr_next(struct thread *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406130555.i5D5tgsl033738>