patch-2.1.101 linux/include/asm-mips/current.h
Next file: linux/include/asm-mips/elf.h
Previous file: linux/include/asm-mips/cpu.h
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Fri May 8 00:13:26 1998
- Orig file:
v2.1.100/linux/include/asm-mips/current.h
- Orig date:
Thu Jun 26 12:33:39 1997
diff -u --recursive --new-file v2.1.100/linux/include/asm-mips/current.h linux/include/asm-mips/current.h
@@ -3,33 +3,13 @@
#ifdef __LANGUAGE_C__
-static inline struct task_struct *__get_current(void)
-{
- struct task_struct *__current;
-
- __asm__("ori\t%0,$29,%1\n\t"
- "xori\t%0,%1"
- :"=r" (__current)
- :"ir" (8191UL));
-
- return __current;
-}
-
-#define current __get_current()
+/* MIPS rules... */
+register struct task_struct *current asm("$28");
#endif /* __LANGUAGE_C__ */
#ifdef __LANGUAGE_ASSEMBLY__
/*
- * Get current task pointer
- */
-#define GET_CURRENT(reg) \
- lui reg, %hi(kernelsp); \
- lw reg, %lo(kernelsp)(reg); \
- ori reg, 8191; \
- xori reg, 8191
-
-/*
* Special variant for use by exception handlers when the stack pointer
* is not loaded.
*/
@@ -41,7 +21,6 @@
.set pop; \
ori reg, 8191; \
xori reg, 8191
-
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov