Module: xenomai-gch Branch: for-3.0.x Commit: 97e235ec34c90d897cd0eaf13480aea316657232 URL: http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=97e235ec34c90d897cd0eaf13480aea316657232
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Fri Nov 20 14:50:28 2015 +0100 cobalt/fpu: stall head domain to handle fpu fault Handling an FPU fault and setting the fpu holder must be atomic. --- kernel/cobalt/posix/process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/cobalt/posix/process.c b/kernel/cobalt/posix/process.c index 46fe764..a9aeee5 100644 --- a/kernel/cobalt/posix/process.c +++ b/kernel/cobalt/posix/process.c @@ -731,11 +731,16 @@ static inline int handle_exception(struct ipipe_trap_data *d) if (xnarch_fault_fpu_p(d)) { #ifdef CONFIG_XENO_ARCH_FPU + spl_t s; + /* FPU exception received in primary mode. */ + splhigh(s); if (xnarch_handle_fpu_fault(sched->fpuholder, thread, d)) { sched->fpuholder = thread; + splexit(s); return 1; } + splexit(s); #endif /* CONFIG_XENO_ARCH_FPU */ print_symbol("invalid use of FPU in Xenomai context at %s\n", xnarch_fault_pc(d)); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git