summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-20 15:45:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-20 15:45:15 +0000
commite91e9e7bbf1d93cdff89878b776a7824a9bc2d99 (patch)
treedb5ce495631901ac5458a7373cfcb0bae9e2fc56 /numeric.c
parentbb4f36de3a032909c90f6fa72f2134f198958145 (diff)
* eval.c (rb_with_disable_interrupt): prohibit thread context
switch during proc execution. [ruby-dev:21899] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 341d0b8..a33c83a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -19,6 +19,10 @@
#include <floatingpoint.h>
#endif
+#ifdef _UNICOSMP
+#include <intrinsics.h>
+#endif
+
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
@@ -1828,6 +1832,9 @@ Init_Numeric()
#if defined(__FreeBSD__) && __FreeBSD__ < 4
/* allow divide by zero -- Inf */
fpsetmask(fpgetmask() & ~(FP_X_DZ|FP_X_INV|FP_X_OFL));
+#elif defined(_UNICOSMP)
+ /* Turn off floating point exceptions for divide by zero, etc. */
+ _set_Creg(0, 0);
#endif
id_coerce = rb_intern("coerce");
id_to_i = rb_intern("to_i");