···11-/*22- * include/asm-sparc/current.h11+/* include/asm-sparc/current.h32 *43 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation54 * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com)55+ * Copyright (C) 2007 David S. Miller (davem@davemloft.net)66 *77 * Derived from "include/asm-s390/current.h" by88 * Martin Schwidefsky (schwidefsky@de.ibm.com)99 * Derived from "include/asm-i386/current.h"1010- */1111-#ifndef _ASM_CURRENT_H1212-#define _ASM_CURRENT_H1313-1414-/*1515- * At the sparc64 DaveM keeps current_thread_info in %g4.1616- * We might want to consider doing the same to shave a few cycles.1717- */1010+*/1111+#ifndef _SPARC_CURRENT_H1212+#define _SPARC_CURRENT_H18131914#include <linux/thread_info.h>20152121-struct task_struct;1616+#ifdef CONFIG_SPARC641717+register struct task_struct *current asm("g4");1818+#endif22192323-/* Two stage process (inline + #define) for type-checking. */2424-/* We also obfuscate get_current() to check if anyone used that by mistake. */2020+#ifdef CONFIG_SPARC322121+/* We might want to consider using %g4 like sparc64 to shave a few cycles.2222+ *2323+ * Two stage process (inline + #define) for type-checking.2424+ * We also obfuscate get_current() to check if anyone used that by mistake.2525+ */2626+struct task_struct;2527static inline struct task_struct *__get_current(void)2628{2729 return current_thread_info()->task;2830}2931#define current __get_current()3232+#endif30333131-#endif /* !(_ASM_CURRENT_H) */3434+#endif /* !(_SPARC_CURRENT_H) */