summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2002-12-03 17:28:32 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2002-12-03 17:28:32 -0800
commit51983eb2408c4104b3e52cd2df9342d1e67ff09e (patch)
treee18a97ff6de2fe804c4ed2d9e4b3d91187fe3c7d /include
parenteba0daf3d43a5f44a7932103322f1bed1a2f59d8 (diff)
[SPARC64]: Un-macroify get_wchan.
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc64/processor.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index 587972a02d2f..55eae0ac2162 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -187,36 +187,7 @@ do { \
extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
-#define get_wchan(__TSK) \
-({ extern void scheduling_functions_start_here(void); \
- extern void scheduling_functions_end_here(void); \
- unsigned long pc, fp, bias = 0; \
- unsigned long thread_info_base; \
- struct reg_window *rw; \
- unsigned long __ret = 0; \
- int count = 0; \
- if (!(__TSK) || (__TSK) == current || \
- (__TSK)->state == TASK_RUNNING) \
- goto __out; \
- thread_info_base = (unsigned long) ((__TSK)->thread_info); \
- bias = STACK_BIAS; \
- fp = (__TSK)->thread_info->ksp + bias; \
- do { \
- /* Bogus frame pointer? */ \
- if (fp < (thread_info_base + sizeof(struct thread_info)) || \
- fp >= (thread_info_base + THREAD_SIZE)) \
- break; \
- rw = (struct reg_window *) fp; \
- pc = rw->ins[7]; \
- if (pc < ((unsigned long) scheduling_functions_start_here) || \
- pc >= ((unsigned long) scheduling_functions_end_here)) { \
- __ret = pc; \
- goto __out; \
- } \
- fp = rw->ins[6] + bias; \
- } while (++count < 16); \
-__out: __ret; \
-})
+extern unsigned long get_wchan(struct task_struct *task);
#define KSTK_EIP(tsk) ((tsk)->thread_info->kregs->tpc)
#define KSTK_ESP(tsk) ((tsk)->thread_info->kregs->u_regs[UREG_FP])