arch/parisc/include/asm/current.h

Source file repositories/reference/linux-study-clean/arch/parisc/include/asm/current.h

File Facts

System
Linux kernel
Corpus path
arch/parisc/include/asm/current.h
Extension
.h
Size
437 bytes
Lines
22
Domain
Architecture Layer
Bucket
arch/parisc
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_PARISC_CURRENT_H
#define _ASM_PARISC_CURRENT_H

#ifndef __ASSEMBLER__
struct task_struct;

static __always_inline struct task_struct *get_current(void)
{
	struct task_struct *ts;

	/* do not use mfctl() macro as it is marked volatile */
	asm( "mfctl %%cr30,%0" : "=r" (ts) );
	return ts;
}

#define current get_current()

#endif /* __ASSEMBLER__ */

#endif /* _ASM_PARISC_CURRENT_H */

Annotation

Implementation Notes