Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
51533b61 MS |
2 | #ifndef _ASM_CRIS_ARCH_THREAD_INFO_H |
3 | #define _ASM_CRIS_ARCH_THREAD_INFO_H | |
4 | ||
5 | /* Return a thread_info struct. */ | |
d9b5444e | 6 | static inline struct thread_info *current_thread_info(void) |
51533b61 MS |
7 | { |
8 | struct thread_info *ti; | |
9 | ||
10 | __asm__ __volatile__ ("and.d $sp, %0" : "=r" (ti) : "0" (~8191UL)); | |
11 | return ti; | |
12 | } | |
13 | ||
14 | #endif /* _ASM_CRIS_ARCH_THREAD_INFO_H */ |