arch/arc/include/asm/switch_to.h

Source file repositories/reference/linux-study-clean/arch/arc/include/asm/switch_to.h

File Facts

System
Linux kernel
Corpus path
arch/arc/include/asm/switch_to.h
Extension
.h
Size
554 bytes
Lines
28
Domain
Architecture Layer
Bucket
arch/arc
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_ARC_SWITCH_TO_H
#define _ASM_ARC_SWITCH_TO_H

#ifndef __ASSEMBLER__

#include <linux/sched.h>
#include <asm/dsp-impl.h>
#include <asm/fpu.h>

struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);

#define switch_to(prev, next, last)	\
do {					\
	dsp_save_restore(prev, next);	\
	fpu_save_restore(prev, next);	\
	last = __switch_to(prev, next);\
	mb();				\
} while (0)

#endif

#endif

Annotation

Implementation Notes