From 68795e9367de98482c4a5830e6e94b51bd60f4e3 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Sat, 19 Jan 2002 22:17:07 +0000 Subject: Nearly-working threads re-structuring. Do not integrate, submit-ing to get to Win32, and as "off site" backup. p4raw-id: //depot/perlio@14352 --- pp.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'pp.c') diff --git a/pp.c b/pp.c index 0d7f75bbd3..ef0c75e9d5 100644 --- a/pp.c +++ b/pp.c @@ -1006,7 +1006,7 @@ PP(pp_divide) { dSP; dATARGET; tryAMAGICbin(div,opASSIGN); /* Only try to do UV divide first - if ((SLOPPYDIVIDE is true) or + if ((SLOPPYDIVIDE is true) or (PERL_PRESERVE_IVUV is true and one or both SV is a UV too large to preserve)) The assumption is that it is better to use floating point divide @@ -2702,7 +2702,7 @@ PP(pp_int) # if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE) # ifdef HAS_MODFL_POW32_BUG /* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */ - { + { NV offset = Perl_modf(value, &value); (void)Perl_modf(offset, &offset); value += offset; @@ -3134,7 +3134,7 @@ PP(pp_ord) } XPUSHu(DO_UTF8(argsv) ? utf8_to_uvchr(s, 0) : (*s & 0xff)); - + RETURN; } @@ -3183,7 +3183,7 @@ PP(pp_crypt) * If not possible, croak. * Yes, we made this up. */ SV* tsv = sv_2mortal(newSVsv(left)); - + SvUTF8_on(tsv); if (!sv_utf8_downgrade(tsv, FALSE)) Perl_croak(aTHX_ "Wide character in crypt"); @@ -4541,14 +4541,7 @@ PP(pp_lock) dSP; dTOPss; SV *retsv = sv; -#ifdef USE_5005THREADS - sv_lock(sv); -#endif /* USE_5005THREADS */ -#ifdef USE_ITHREADS - shared_sv *ssv = Perl_sharedsv_find(aTHX_ sv); - if(ssv) - Perl_sharedsv_lock(aTHX_ ssv); -#endif /* USE_ITHREADS */ + SvLOCK(sv); if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV || SvTYPE(retsv) == SVt_PVCV) { retsv = refto(retsv); -- cgit v1.2.1