Skip to contentSkip to conversation

2.5.4 compile error fix

PATCH New David Howells 1 participant 1 message Feb 11, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.4 compile error fix

Hi Linus,

This patch fixes <asm-i386/processor.h> trying to access task_struct (which can't have been defined at that point).

David

include/asm-i386/processor.h +1 -4
diff -uNr linux-2.5.4/include/asm-i386/processor.h linux-orn-254/include/asm-i386/processor.h
@@ -439,10 +439,7 @@
 /*
  * 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];
-}
+#define thread_saved_pc(TSK) (((unsigned long *)(TSK)->thread.esp)[3])
 
 unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)	(((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019])