summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-05-11 21:59:55 +0000
committerjhb <jhb@FreeBSD.org>2006-05-11 21:59:55 +0000
commita8e496593027689028e4b9f690e5e35a2c7c52c4 (patch)
tree972bb6ad5f42eec2a091d00ea2b7fb28c42c38d6 /sys/ddb
parentd4be68b92e2d1d9fa3bc080f015fbb9fdc5ec45d (diff)
downloadFreeBSD-src-a8e496593027689028e4b9f690e5e35a2c7c52c4.zip
FreeBSD-src-a8e496593027689028e4b9f690e5e35a2c7c52c4.tar.gz
Use __LP64__ rather than the PTR64 hack.
Suggested by: ru
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_ps.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index 94b6e54..39dff4c 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -44,17 +44,6 @@ __FBSDID("$FreeBSD$");
#include <ddb/ddb.h>
-/* XXX I'd prefer a better way. */
-#if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || defined(__sparc64__)
-#define PTR64
-#endif
-
-#ifdef PTR64
-CTASSERT(sizeof(uintptr_t) == sizeof(uint64_t));
-#else
-CTASSERT(sizeof(uintptr_t) == sizeof(uint32_t));
-#endif
-
static void dumpthread(volatile struct proc *p, volatile struct thread *td,
int all);
@@ -95,7 +84,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
p = &proc0;
db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
-#ifdef PTR64
+#ifdef __LP64__
db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n");
#else
db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n");
@@ -194,7 +183,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
strlcat(state, "J", sizeof(state));
db_printf(" %-6.6s ", state);
if (p->p_flag & P_HADTHREADS)
-#ifdef PTR64
+#ifdef __LP64__
db_printf(" (threaded) %s\n",
p->p_comm);
#else
@@ -275,7 +264,7 @@ dumpthread(volatile struct proc *p, volatile struct thread *td, int all)
}
db_printf("%c%-8.8s ", wprefix, wmesg);
if (wchan == NULL)
-#ifdef PTR64
+#ifdef __LP64__
db_printf("%18s ", "");
#else
db_printf("%10s ", "");
OpenPOWER on IntegriCloud