lkml.org 
[lkml]   [2005]   [Aug]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 17 Aug 2005 16:58:13 +0900
FromHiro Yoshioka <>
Subjectmath_state_restore() question
Hi,

I have a quick question.

The math_state_restore() restores the FPU/MMX/XMM states.
However where do we save the previous task's states if it is necessary?

asmlinkage void math_state_restore(struct pt_regs regs)
{
        struct thread_info *thread = current_thread_info();
        struct task_struct *tsk = thread->task;
        clts();         /* Allow maths ops (or we recurse) */
        if (!tsk_used_math(tsk))
                init_fpu(tsk);
        restore_fpu(tsk);
        thread->status |= TS_USEDFPU;   /* So we fnsave on switch_to() */
}
Thanks in advance,
  Hiro
-- 
Hiro Yoshioka
mailto:hyoshiok at miraclelinux.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-17 10:00    [from the cache]
©2003-2008