mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
asm-generic: current: Don't include thread-info.h if building asm
asm/current.h is included by some assembly files (either directly, or indirectly). This works on some architectures (such as x86), as their implementation of current.h is careful to not include any C, but the asm-generic version includes linux/thread-info.h unconditionally, which leads to errors when either C code or non-asm-compatible preprocessor directives are included. Just wrap the contents behind an #ifndef __ASSEMBLY__ to avoid any C code making its way in. Signed-off-by: David Gow <davidgow@google.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
11ae290ee6
commit
760ee8f838
@ -2,9 +2,11 @@
|
||||
#ifndef __ASM_GENERIC_CURRENT_H
|
||||
#define __ASM_GENERIC_CURRENT_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/thread_info.h>
|
||||
|
||||
#define get_current() (current_thread_info()->task)
|
||||
#define current get_current()
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_GENERIC_CURRENT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user