diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-06 13:11:42 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-06 13:11:42 +0100 |
commit | 539626070dd9b9b1e2d89874ab84cdb02031c2a0 (patch) | |
tree | 84c1c5335e82bb79d39e89059828be5932a8cbff /kern/thread.c | |
parent | 689810afe2d20d5f24f2a2379d3b9feffd0e9698 (diff) | |
download | gnumach-539626070dd9b9b1e2d89874ab84cdb02031c2a0.tar.gz gnumach-539626070dd9b9b1e2d89874ab84cdb02031c2a0.tar.bz2 gnumach-539626070dd9b9b1e2d89874ab84cdb02031c2a0.zip |
Inherit fpu control word from parent to child
* i386/i386/thread.h (struct pcb): Add init_control field.
* i386/i386/fpu.h (fpinherit): New prototype.
* i386/i386/fpu.c (fpinit): Add thread parameter. When init_control field is
set, use that value instead of a hardcoded one.
(fpinherit): New function.
(fp_load): Pass thread parameter to fpinit().
* kern/thread.c (thread_create): Pass parent task to pcb_init().
* i386/i386/pcb.c (pcb_init): Add parent_task parameter, call fpinherit when
it is equal to current_task().
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/thread.c b/kern/thread.c index d8d6af57..a2ec3d31 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -440,7 +440,7 @@ kern_return_t thread_create( * Create a pcb. The kernel stack is created later, * when the thread is swapped-in. */ - pcb_init(new_thread); + pcb_init(parent_task, new_thread); ipc_thread_init(new_thread); |