This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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: Thread safety of functions generated when using -ffinite-math-only gcc command option


On Tue, Jul 29, 2014 at 12:40 AM, David Livshin
<david.livshin@dalsoft.com> wrote:
> gcc ( when called with -ffinite-math-only option ) generates calls to
> "__<name>_finite" functions ( e.g. __exp_finite ) - which of these functions
> are thread safe?
> May it be assumed that  "__<name>_finite" function is thread safe iff
> "<name>" is thread safe?

Yes.

The compiler switch should not change the underlying semantics of the
operation unless it says it does.

In general the math routines tend to be pure and thus thread safe.

There are some exceptions particularly when dealing with software
emulated floating point, but I believe we've fixed those
implementations to use thread local storage.

Cheers,
Carlos.


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