patch-2.4.2 linux/include/asm-cris/current.h

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

diff -u --recursive --new-file v2.4.1/linux/include/asm-cris/current.h linux/include/asm-cris/current.h
@@ -0,0 +1,15 @@
+#ifndef _CRIS_CURRENT_H
+#define _CRIS_CURRENT_H
+
+struct task_struct;
+
+static inline struct task_struct * get_current(void)
+{
+        struct task_struct *current;
+        __asm__("and.d sp,%0; ":"=r" (current) : "0" (~8191UL));
+        return current;
+ }
+ 
+#define current get_current()
+
+#endif /* !(_CRIS_CURRENT_H) */

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