errno is not a problem, as it is transparently taken care of--see
sys/errno.h.
errno is not really a global, but calls a function that returns a
pointer to
the thread's individual errno within the reentrancy structure.
Craig
On 01/09/2013 09:06 AM, Gregory Pietsch wrote:
Oh yeah, forgot about errno. I guess the best way to avoid that is to
make sure
the number you are taking the square root of isn't negative. -- Gregory
On 1/9/2013 4:37 AM, Marcus Hult wrote:
Hello,
Thanks for your reply Gregory.
The sqrt function for instance, may set the errno variable according
to the manual. Shouldn’t this function then have a reentrant version?
Or do I always need to use the _impure_ptr when using libm, to be
thread safe?
/Marcus