Commit 66c92d06 authored by Jens Axboe's avatar Jens Axboe

thread_saved_pc fix from akpm

parent 8baf628d
...@@ -54,6 +54,14 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); ...@@ -54,6 +54,14 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
int hlt_counter; 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.. * Powermanagement idle function, if any..
*/ */
......
...@@ -436,13 +436,7 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); ...@@ -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 copy_segments(struct task_struct *p, struct mm_struct * mm);
extern void release_segments(struct mm_struct * mm); extern void release_segments(struct mm_struct * mm);
/* extern unsigned long thread_saved_pc(struct task_struct *tsk);
* 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];
}
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019]) #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment