summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/current.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/current.h')
-rw-r--r--include/asm-mips/current.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-mips/current.h b/include/asm-mips/current.h
new file mode 100644
index 000000000..7955aad50
--- /dev/null
+++ b/include/asm-mips/current.h
@@ -0,0 +1,13 @@
+#ifndef __ASM_MIPS_CURRENT_H
+#define __ASM_MIPS_CURRENT_H
+
+/*
+ * Some architectures may want to do something "clever" here since
+ * this is the most frequently accessed piece of data in the entire
+ * kernel. For an example, see the Sparc implementation where an
+ * entire register is hard locked to contain the value of current.
+ */
+extern struct task_struct *current_set[NR_CPUS];
+#define current (current_set[smp_processor_id()]) /* Current on this processor */
+
+#endif /* __ASM_MIPS_CURRENT_H */