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] | |
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
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
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |