This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Non reentrant floating point functions?


On 03/13/2015 03:29 AM, Rasmus Bo SÃrensen wrote:
> Hi,
> 
> I just started using the floating point functions of newlib on an
> embedded multicore processor that we are developing at the Technical University of Denmark.
> I am puzzled about the "#ifndef _REENT_ONLY"  in line 125 of 'newlib/libc/include/math.h'.
> Are the functions in lines 127 - 138 not meant to be reentrant?
> And in this case what is it that makes them non-reentrant?

Any math function which is required to set errno on failure is not
necessarily reentrant (or rather, _REENT_ONLY is designed to protect
setups where errno is global rather than thread-local).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]