Subject: Re: floating point in signal handlers
To: Dr. Lex Wennmacher <wennmach@geo.Uni-Koeln.DE>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 10/18/1999 11:27:21
On Sat, Oct 16, 1999 at 09:58:12PM +0200, Dr. Lex Wennmacher wrote:
> [...]
> I see several possible ways to remove the no-floating-point-in-a-signal-hander-
> restriction:
>
> 1) the kernel always saves and restores the FPU for the process when calling a
> signal handler;
> 2) the kernel does lazy saving of the FPU;
> 3) libc provides routines to save and restore the FPU. It is the responsibility
> of the programmer to call these if floating point arithmetic is done in a
> signal handler.
> [4) I'm not shure about the following: in function calls, the compiler could
> implement saving of the FPU by the callee (as an option)?]
>
I dislike [3]. In some cirtunstances there may be some 'hidden' FP ops.
What do other OSes do ?
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--