[PATCH 2/5] add base fenv.h and default sys/fenv.h

Patrick Mansfield patmans@us.ibm.com
Tue Feb 13 20:08:00 GMT 2007

On Tue, Feb 13, 2007 at 10:34:33PM +0900, Kazunori Asayama wrote:
> Patrick Mansfield <patmans@us.ibm.com> wrote:
> > I added those, and some "#ifndef _FENV_H"
> Be care. You are using the same macro _FENV_H for
> libc/machine/spu/sys/fenv.h.

Yes, I got that one too.

> > Do I need to use _EXFUN for the function prototypes?
> I'm not sure, but it seems preferable to do so.

OK ... I will change that too.

> BTW, I don't know how the fenv functions should behave in
> multi-threading environment, i.e., should the fenv functions affect
> only the current thread ? If so, I suppose that fenv status should be
> managed by using _reent structure and that reentrant versions of fenv
> functions should be also declared in fenv.h...

No, since we don't have threading. Right? 

Even if we did, AFAIUI only the fpscr hardware state would have to be
saved and restored for threads, there is no other global data or state.

And I was thinking we should supply reentrant syscalls directly - replace
the _r functions - and don't know why it was not implemented that way to
start with.

-- Patrick Mansfield

More information about the Newlib mailing list