/* * This is the structure pointed to by thread.sp for an inactive task. The * order of the fields must match the code in __switch_to_asm().
*/ struct inactive_task_frame { #ifdef CONFIG_X86_64 unsignedlong r15; unsignedlong r14; unsignedlong r13; unsignedlong r12; #else unsignedlong flags; unsignedlong si; unsignedlong di; #endif unsignedlong bx;
/* * These two fields must be together. They form a stack frame header, * needed by get_frame_pointer().
*/ unsignedlong bp; unsignedlong ret_addr;
};
#define switch_to(prev, next, last) \ do { \
((last) = __switch_to_asm((prev), (next))); \
} while (0)
#ifdef CONFIG_X86_32 #include <asm/msr.h>
staticinlinevoid refresh_sysenter_cs(struct thread_struct *thread)
{ /* Only happens when SEP is enabled, no need to test "SEP"arately: */ if (unlikely(this_cpu_read(cpu_tss_rw.x86_tss.ss1) == thread->sysenter_cs)) return;
/* This is used when switching tasks or entering/exiting vm86 mode. */ staticinlinevoid update_task_stack(struct task_struct *task)
{ /* sp0 always points to the entry trampoline stack, which is constant: */ #ifdef CONFIG_X86_32
this_cpu_write(cpu_tss_rw.x86_tss.sp1, task->thread.sp0); #else if (!cpu_feature_enabled(X86_FEATURE_FRED) && cpu_feature_enabled(X86_FEATURE_XENPV)) /* Xen PV enters the kernel on the thread stack. */
load_sp0(task_top_of_stack(task)); #endif
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.