To: linux-m68k@lists.linux-m68k.org
Subject: L68K: Fix for thread_saved_pc
X-Yow: I have a very good DENTAL PLAN.  Thank you.
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: 01 Apr 1998 10:45:36 +0200
Sender: owner-linux-m68k@phil.uni-sb.de

This patch fixes thread_saved_pc in 2.1.90 so that it works again.

Andreas.

----------------------------------------------------------------------
--- include/asm-m68k/processor.h.~1~	Wed Jan 21 19:18:14 1998
+++ include/asm-m68k/processor.h	Sun Mar 29 03:33:26 1998
@@ -83,12 +83,12 @@
  */
 extern inline unsigned long thread_saved_pc(struct thread_struct *t)
 {
-	extern int sys_pause(void);
-	extern void schedule(void);
+	extern void scheduling_functions_start_here(void);
+	extern void scheduling_functions_end_here(void);
 	struct switch_stack *sw = (struct switch_stack *)t->ksp;
 	/* Check whether the thread is blocked in resume() */
-	if (sw->retpc >= (unsigned long)schedule &&
-	    sw->retpc < (unsigned long)sys_pause)
+	if (sw->retpc > (unsigned long)scheduling_functions_start_here &&
+	    sw->retpc < (unsigned long)scheduling_functions_end_here)
 		return ((unsigned long *)sw->a6)[1];
 	else
 		return sw->retpc;
