44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
$OpenBSD: patch-sysdeps_freebsd_prockernel_c,v 1.3 2002/09/11 16:45:08 pvalchev Exp $
|
|
--- sysdeps/freebsd/prockernel.c.orig Mon Nov 26 15:37:59 2001
|
|
+++ sysdeps/freebsd/prockernel.c Tue Sep 10 22:31:22 2002
|
|
@@ -34,7 +34,7 @@
|
|
#if (!defined __OpenBSD__) && (!defined __bsdi__)
|
|
#include <sys/user.h>
|
|
#endif
|
|
-#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__))
|
|
+#if !defined(__bsdi__) && !((defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__alpha__))
|
|
#include <machine/pcb.h>
|
|
#endif
|
|
#if defined(__FreeBSD__) && !defined(__alpha__)
|
|
@@ -68,7 +68,9 @@ void
|
|
glibtop_init_proc_kernel_p (glibtop *server)
|
|
{
|
|
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats |
|
|
+#if (!defined __OpenBSD__) || (defined __i386__)
|
|
_glibtop_sysdeps_proc_kernel_pcb |
|
|
+#endif
|
|
_glibtop_sysdeps_proc_kernel_wchan;
|
|
}
|
|
|
|
@@ -167,14 +169,20 @@ glibtop_get_proc_kernel_p (glibtop *serv
|
|
/*xxx FreeBSD/Alpha? */
|
|
#endif
|
|
#else
|
|
+#if (!defined __OpenBSD__) || (defined __i386__)
|
|
buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0;
|
|
+#endif
|
|
#ifdef __bsdi__
|
|
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip;
|
|
#else
|
|
+#if (!defined __OpenBSD__) || (defined __i386__)
|
|
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip;
|
|
+#endif
|
|
#endif
|
|
|
|
+#if (!defined __OpenBSD__) || (defined __i386__)
|
|
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
|
|
+#endif
|
|
#endif
|
|
}
|
|
|