函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\core.c Create Date:2022-07-27 08:49:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:fpu__copy

函数原型:int fpu__copy(struct task_struct *dst, struct task_struct *src)

返回类型:int

参数:

类型参数名称
struct task_struct *dst
struct task_struct *src
169  dst_fpu等于 Floating point and extended processor state
170  src_fpu等于 Floating point and extended processor state
172  @last_cpu:* Records the last CPU on which this context was loaded into* FPU registers等于负1
174  如果非static_cpu_has(Onboard FPU )则返回:0
177  WARN_ON_FPU(src_fpu != & fpu)
183  memset( & xsave, 0, Size of the FPU context state. All tasks in the system use the* same context size, regardless of what portion they use.* This is inherent to the XSAVE architecture which puts all state* components into a single, continuous memory block:)
193  Use fpregs_lock() while editing CPU's FPU registers or fpu->state.* A context switch will (and softirq might) save CPU's FPU registers to* fpu->state and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in* a random state.
194  如果test_thread_flag(load FPU on return to userspace )则memcpy( & @state:* In-memory copy of all FPU registers that we save/restore* over context switches. If the task is using the FPU then* the registers in the FPU are more recent than this state* copy. If the task context-switches away then they get, & @state:* In-memory copy of all FPU registers that we save/restore* over context switches. If the task is using the FPU then* the registers in the FPU are more recent than this state* copy. If the task context-switches away then they get, Size of the FPU context state. All tasks in the system use the* same context size, regardless of what portion they use.* This is inherent to the XSAVE architecture which puts all state* components into a single, continuous memory block:)
197  否则如果非These must be called with preempt disabledcopy_kernel_to_fpregs( & @state:* In-memory copy of all FPU registers that we save/restore* over context switches. If the task is using the FPU then* the registers in the FPU are more recent than this state* copy. If the task context-switches away then they get)
200  fpregs_unlock()
202  Set thread flags in other task's structures.* See asm/thread_info.h for TIF_xxxx flags available:
204  trace_x86_fpu_copy_src(src_fpu)
205  trace_x86_fpu_copy_dst(dst_fpu)
207  返回:0
调用者
名称描述
arch_dup_task_structhis gets called so that we can store lazy state into memory and copy the* current task into the new thread.