From: Nick Ing-Simmons Date: Tue, 16 Oct 2001 14:08:16 +0000 (+0000) Subject: Builds under ithreads (but fails all threads tests) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8fc9800e47fd3c23e88282f4505c051278ccc9b;p=p5sagit%2Fp5-mst-13.2.git Builds under ithreads (but fails all threads tests) p4raw-id: //depot/perlio@12456 --- diff --git a/hv.c b/hv.c index d553920..d3bb914 100644 --- a/hv.c +++ b/hv.c @@ -99,7 +99,7 @@ Perl_unshare_hek(pTHX_ HEK *hek) #if defined(USE_ITHREADS) HE * -Perl_he_dup(pTHX_ HE *e, bool shared, clone_params* param) +Perl_he_dup(pTHX_ HE *e, bool shared, CLONE_PARAMS* param) { HE *ret; diff --git a/perlio.c b/perlio.c index 679aa51..0349795 100644 --- a/perlio.c +++ b/perlio.c @@ -978,7 +978,9 @@ PerlIO_fdupopen(pTHX_ PerlIO *f, CLONE_PARAMS *param) { if (f && *f) { PerlIO_funcs *tab = PerlIOBase(f)->tab; - PerlIO *new = (*tab->Dup)(aTHX_ PerlIO_allocate(aTHX),f,param); + PerlIO *new; + PerlIO_debug("fdupopen f=%p param=%p\n",f,param); + new = (*tab->Dup)(aTHX_ PerlIO_allocate(aTHX),f,param); return new; } else { @@ -2000,6 +2002,7 @@ PerlIO * PerlIOBase_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param) { PerlIO *nexto = PerlIONext(o); + PerlIO_debug("PerlIOBase_dup f=%p o=%p param=%p\n",f,o,param); if (*nexto) { PerlIO_funcs *tab = PerlIOBase(nexto)->tab; f = (*tab->Dup)(aTHX_ f, nexto, param); @@ -2532,7 +2535,7 @@ PerlIOStdio_set_ptrcnt(PerlIO *f, STDCHAR * ptr, SSize_t cnt) PerlIO * PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param) { - return NULL; + return PerlIOBase_dup(aTHX_ f, o, param); } PerlIO_funcs PerlIO_stdio = { @@ -3029,7 +3032,7 @@ PerlIOBuf_set_ptrcnt(PerlIO *f, STDCHAR * ptr, SSize_t cnt) PerlIO * PerlIOBuf_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param) { - return NULL; + return PerlIOBase_dup(aTHX_ f, o, param); } @@ -3757,7 +3760,7 @@ PerlIOMmap_close(PerlIO *f) PerlIO * PerlIOMmap_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param) { - return NULL; + return PerlIOBase_dup(aTHX_ f, o, param); } diff --git a/sv.c b/sv.c index 35fe436..3afbd56 100644 --- a/sv.c +++ b/sv.c @@ -8382,7 +8382,7 @@ ptr_table_* functions. regcomp.c. AMS 20010712 */ REGEXP * -Perl_re_dup(pTHX_ REGEXP *r, clone_params *param) +Perl_re_dup(pTHX_ REGEXP *r, CLONE_PARAMS *param) { REGEXP *ret; int i, len, npar; @@ -8480,7 +8480,7 @@ Perl_re_dup(pTHX_ REGEXP *r, clone_params *param) /* duplicate a file handle */ PerlIO * -Perl_fp_dup(pTHX_ PerlIO *fp, char type,clone_params *param) +Perl_fp_dup(pTHX_ PerlIO *fp, char type, CLONE_PARAMS *param) { PerlIO *ret; if (!fp) @@ -8511,7 +8511,7 @@ Perl_dirp_dup(pTHX_ DIR *dp) /* duplicate a typeglob */ GP * -Perl_gp_dup(pTHX_ GP *gp, clone_params* param) +Perl_gp_dup(pTHX_ GP *gp, CLONE_PARAMS* param) { GP *ret; if (!gp) @@ -8544,7 +8544,7 @@ Perl_gp_dup(pTHX_ GP *gp, clone_params* param) /* duplicate a chain of magic */ MAGIC * -Perl_mg_dup(pTHX_ MAGIC *mg, clone_params* param) +Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS* param) { MAGIC *mgprev = (MAGIC*)NULL; MAGIC *mgret; @@ -8815,7 +8815,7 @@ S_gv_share(pTHX_ SV *sstr) /* duplicate an SV of any type (including AV, HV etc) */ SV * -Perl_sv_dup(pTHX_ SV *sstr, clone_params* param) +Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) { SV *dstr; @@ -9010,11 +9010,11 @@ Perl_sv_dup(pTHX_ SV *sstr, clone_params* param) SvPVX(dstr) = SAVEPVN(SvPVX(sstr), SvLEN(sstr)-1); else SvPVX(dstr) = SvPVX(sstr); /* XXX shared string/random ptr? */ - IoIFP(dstr) = fp_dup(IoIFP(sstr), IoTYPE(sstr)); + IoIFP(dstr) = fp_dup(IoIFP(sstr), IoTYPE(sstr), param); if (IoOFP(sstr) == IoIFP(sstr)) IoOFP(dstr) = IoIFP(dstr); else - IoOFP(dstr) = fp_dup(IoOFP(sstr), IoTYPE(sstr)); + IoOFP(dstr) = fp_dup(IoOFP(sstr), IoTYPE(sstr), param); /* PL_rsfp_filters entries have fake IoDIRP() */ if (IoDIRP(sstr) && !(IoFLAGS(sstr) & IOf_FAKE_DIRP)) IoDIRP(dstr) = dirp_dup(IoDIRP(sstr)); @@ -9167,7 +9167,7 @@ Perl_sv_dup(pTHX_ SV *sstr, clone_params* param) /* duplicate a context */ PERL_CONTEXT * -Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, clone_params* param) +Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) { PERL_CONTEXT *ncxs; @@ -9255,7 +9255,7 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, clone_params* param) /* duplicate a stack info structure */ PERL_SI * -Perl_si_dup(pTHX_ PERL_SI *si, clone_params* param) +Perl_si_dup(pTHX_ PERL_SI *si, CLONE_PARAMS* param) { PERL_SI *nsi; @@ -9330,7 +9330,7 @@ Perl_any_dup(pTHX_ void *v, PerlInterpreter *proto_perl) /* duplicate the save stack */ ANY * -Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, clone_params* param) +Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) { ANY *ss = proto_perl->Tsavestack; I32 ix = proto_perl->Tsavestack_ix; @@ -9625,7 +9625,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, * their pointers copied. */ IV i; - clone_params* param = (clone_params*) malloc(sizeof(clone_params)); + CLONE_PARAMS* param = (CLONE_PARAMS*) MALLOC(SIZEOF(CLONE_PARAMS)); PerlInterpreter *my_perl = (PerlInterpreter*)(*ipM->pMalloc)(ipM, sizeof(PerlInterpreter)); PERL_SET_THX(my_perl); @@ -9653,7 +9653,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_Proc = ipP; #else /* !PERL_IMPLICIT_SYS */ IV i; - clone_params* param = (clone_params*) malloc(sizeof(clone_params)); + CLONE_PARAMS* param = (CLONE_PARAMS*) malloc(sizeof(CLONE_PARAMS)); PerlInterpreter *my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); PERL_SET_THX(my_perl); @@ -9924,7 +9924,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_custom_op_descs = hv_dup_inc(proto_perl->Icustom_op_descs,param); PL_profiledata = NULL; - PL_rsfp = fp_dup(proto_perl->Irsfp, '<'); + PL_rsfp = fp_dup(proto_perl->Irsfp, '<', param); /* PL_rsfp_filters entries have fake IoDIRP() */ PL_rsfp_filters = av_dup_inc(proto_perl->Irsfp_filters, param);