pthreads and floating point attributes?
> Does the pthreads standard have anything to say about whether threads > inherit the floating point attributes of the main program? > > In particular, I am working on a system that implements the > fesetflushtozero() function to change the underflow behavior of IEEE > floating point from gradual to sudden. The man pages on this system > say that this function has been adopted for inclusion in the C9X > standard. What I need to know is whether the effect of calling this > function in the main program should be inherited by threads that are > subsequently created by the main program? On the system that I am > working on, this turned out not to be the case, and before reporting > this as a bug, I need to know whether this constitutes a bug, from the > standpoint of the pthreads standard, or whether this is just a quality > of implementation issue. POSIX 1003.1c-1995 (and UNIX 98) doesn’t say anything about floating point state, because that’s not really a portable concept. (Some machines