From ea5ef30f5a234df3726d1c9be4c27f9e080082b7 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 24 Jan 2011 10:04:28 +0000 Subject: [PATCH] Provide LWP_PC --- sys/arch/sparc/include/cpu.h | 5 ++++- sys/arch/sparc64/include/cpu.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arch/sparc/include/cpu.h b/sys/arch/sparc/include/cpu.h index 99a5c9620b69..e2af23838991 100644 --- a/sys/arch/sparc/include/cpu.h +++ b/sys/arch/sparc/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.90 2011/01/13 05:20:27 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.91 2011/01/24 10:05:22 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -151,6 +151,9 @@ extern int cpu_arch; /* Number of CPUs in the system */ extern int sparc_ncpus; +/* Provide %pc of a lwp */ +#define LWP_PC(l) ((l)->l_md.md_tf->tf_pc) + /* * Interrupt handler chains. Interrupt handlers should return 0 for * ``not me'' or 1 (``I took care of it''). intr_establish() inserts a diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index e192bd3c1087..bf999012474e 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.93 2010/12/26 12:06:57 martin Exp $ */ +/* $NetBSD: cpu.h,v 1.94 2011/01/24 10:04:28 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -264,6 +264,9 @@ void sparc64_generic_xcall(struct cpu_info*, ipi_c_call_func_t, void*); #endif +/* Provide %pc of a lwp */ +#define LWP_PC(l) ((l)->l_md.md_tf->tf_pc) + /* * Arguments to hardclock, softclock and gatherstats encapsulate the * previous machine state in an opaque clockframe. The ipl is here