patch-2.4.0-test12 linux/include/asm-parisc/current.h

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

diff -u --recursive --new-file v2.4.0-test11/linux/include/asm-parisc/current.h linux/include/asm-parisc/current.h
@@ -0,0 +1,19 @@
+#ifndef _PARISC_CURRENT_H
+#define _PARISC_CURRENT_H
+
+#include <asm/processor.h>
+
+struct task_struct;
+
+static inline struct task_struct * get_current(void)
+{
+	struct task_struct *current;
+
+	asm("copy 30,%0" : "=r" (current));
+	
+	return (struct task_struct *)((long) current & ~(THREAD_SIZE-1));
+}
+ 
+#define current get_current()
+
+#endif /* !(_PARISC_CURRENT_H) */

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