patch-2.4.20 linux-2.4.20/include/asm-parisc/current.h

Next file: linux-2.4.20/include/asm-parisc/delay.h
Previous file: linux-2.4.20/include/asm-parisc/checksum.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/asm-parisc/current.h linux-2.4.20/include/asm-parisc/current.h
@@ -7,11 +7,10 @@
 
 static inline struct task_struct * get_current(void)
 {
-	struct task_struct *current;
+	register unsigned long cr;
 
-	asm("copy 30,%0" : "=r" (current));
-	
-	return (struct task_struct *)((long) current & ~(THREAD_SIZE-1));
+	__asm__ __volatile__("mfctl %%cr30,%0" : "=r" (cr) );
+	return (struct task_struct *)cr;
 }
  
 #define current get_current()

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)