From 66c92d0614790e8fbebdddac6df7818fde47ff68 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 11 Feb 2002 12:15:42 +0100 Subject: [PATCH] thread_saved_pc fix from akpm --- arch/i386/kernel/process.c | 8 ++++++++ include/asm-i386/processor.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 99710bb8bbcc..a0776f366324 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -54,6 +54,14 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); int hlt_counter; +/* + * Return saved PC of a blocked thread. + */ +unsigned long thread_saved_pc(struct task_struct *tsk) +{ + return ((unsigned long *)tsk->thread.esp)[3]; +} + /* * Powermanagement idle function, if any.. */ diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index ec48a38e5e0f..256c8a0827dd 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -436,13 +436,7 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern void copy_segments(struct task_struct *p, struct mm_struct * mm); extern void release_segments(struct mm_struct * mm); -/* - * Return saved PC of a blocked thread. - */ -static inline unsigned long thread_saved_pc(struct task_struct *tsk) -{ - return ((unsigned long *)tsk->thread->esp)[3]; -} +extern unsigned long thread_saved_pc(struct task_struct *tsk); unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019]) -- 2.39.5