mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel: Reset FPU state on exec()
This commit is contained in:
parent
315538245f
commit
9aa234cc47
3 changed files with 9 additions and 2 deletions
|
@ -94,7 +94,7 @@ Thread::Thread(Process& process)
|
|||
#endif
|
||||
set_default_signal_dispositions();
|
||||
m_fpu_state = (FPUState*)kmalloc_aligned(sizeof(FPUState), 16);
|
||||
memcpy(m_fpu_state, &s_clean_fpu_state, sizeof(FPUState));
|
||||
reset_fpu_state();
|
||||
memset(&m_tss, 0, sizeof(m_tss));
|
||||
m_tss.iomapbase = sizeof(TSS32);
|
||||
|
||||
|
@ -879,4 +879,9 @@ Thread* Thread::from_tid(int tid)
|
|||
return found_thread;
|
||||
}
|
||||
|
||||
void Thread::reset_fpu_state()
|
||||
{
|
||||
memcpy(m_fpu_state, &s_clean_fpu_state, sizeof(FPUState));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue