20 lines
356 B
C
Raw Normal View History

2026-01-21 18:59:54 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_SW64_CURRENT_H
#define _ASM_SW64_CURRENT_H
2026-01-29 22:25:33 +08:00
#ifndef __ASSEMBLY__
2026-01-21 18:59:54 +08:00
2026-01-29 22:25:33 +08:00
struct task_struct;
static __always_inline struct task_struct *get_current(void)
{
register struct task_struct *tp __asm__("$8");
return tp;
}
#define current get_current()
#endif /* __ASSEMBLY__ */
2026-01-21 18:59:54 +08:00
#endif /* _ASM_SW64_CURRENT_H */