Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/parisc/include/asm/current.h
26298 views
1
/* SPDX-License-Identifier: GPL-2.0 */
2
#ifndef _ASM_PARISC_CURRENT_H
3
#define _ASM_PARISC_CURRENT_H
4
5
#ifndef __ASSEMBLER__
6
struct task_struct;
7
8
static __always_inline struct task_struct *get_current(void)
9
{
10
struct task_struct *ts;
11
12
/* do not use mfctl() macro as it is marked volatile */
13
asm( "mfctl %%cr30,%0" : "=r" (ts) );
14
return ts;
15
}
16
17
#define current get_current()
18
19
#endif /* __ASSEMBLER__ */
20
21
#endif /* _ASM_PARISC_CURRENT_H */
22
23