PERFORCE change 54791 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun Jun 13 05:57:08 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=54791

Change 54791 by marcel at 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 *);


More information about the p4-projects mailing list