diff options
-rwxr-xr-x | Porting/findvars | 12 | ||||
-rw-r--r-- | gv.c | 1 | ||||
-rw-r--r-- | hv.c | 4 | ||||
-rw-r--r-- | op.c | 1 | ||||
-rw-r--r-- | perl.c | 1 | ||||
-rw-r--r-- | pp_ctl.c | 1 | ||||
-rw-r--r-- | sv.c | 22 |
7 files changed, 0 insertions, 42 deletions
diff --git a/Porting/findvars b/Porting/findvars index 26a4bcf11d..b2914f5652 100755 --- a/Porting/findvars +++ b/Porting/findvars @@ -82,7 +82,6 @@ curstack curstackinfo curstash curstname -curthr dbargs debdelim debname @@ -108,9 +107,6 @@ envgv errgv error_count euid -eval_cond -eval_mutex -eval_owner eval_root eval_start evalseq @@ -212,8 +208,6 @@ nice_chunk nice_chunk_size ninterps nomemok -nthreads -nthreads_cond numeric_local numeric_name numeric_standard @@ -332,22 +326,16 @@ subline subname sv_arenaroot sv_count -sv_mutex sv_no sv_objcount sv_root sv_undef sv_yes -svref_mutex sys_intern tainted tainting thisexpr thr_key -threadnum -threads_mutex -threadsv_names -thrsv timesbuf tmps_floor tmps_ix @@ -255,7 +255,6 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) if (exported_constant) GvIMPORTED_CV_on(gv); } else { - /* XXX unsafe for threads if eval_owner isn't held */ (void) start_subparse(0,0); /* Create empty CV in compcv. */ GvCV(gv) = PL_compcv; } @@ -68,23 +68,19 @@ S_new_he(pTHX) HE* he; void ** const root = &PL_body_roots[HE_SVSLOT]; - LOCK_SV_MUTEX; if (!*root) S_more_he(aTHX); he = (HE*) *root; assert(he); *root = HeNEXT(he); - UNLOCK_SV_MUTEX; return he; } #define new_HE() new_he() #define del_HE(p) \ STMT_START { \ - LOCK_SV_MUTEX; \ HeNEXT(p) = (HE*)(PL_body_roots[HE_SVSLOT]); \ PL_body_roots[HE_SVSLOT] = p; \ - UNLOCK_SV_MUTEX; \ } STMT_END @@ -5467,7 +5467,6 @@ S_process_special_blocks(pTHX_ const char *const fullname, GV *const gv, } } -/* XXX unsafe for threads if eval_owner isn't held */ /* =for apidoc newCONSTSUB @@ -2492,7 +2492,6 @@ CV* Perl_get_cvn_flags(pTHX_ const char *name, STRLEN len, I32 flags) { GV* const gv = gv_fetchpvn_flags(name, len, flags, SVt_PVCV); - /* XXX unsafe for threads if eval_owner isn't held */ /* XXX this is probably not what they think they're getting. * It has the same effect as "sub name;", i.e. just a forward * declaration! */ @@ -2874,7 +2874,6 @@ Perl_find_runcv(pTHX_ U32 *db_seqp) * outside is the lexically enclosing CV (if any) that invoked us. */ -/* With USE_5005THREADS, eval_owner must be held on entry to doeval */ STATIC OP * S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) { @@ -104,10 +104,6 @@ At the time of very final cleanup, sv_free_arenas() is called from perl_destruct() to physically free all the arenas allocated since the start of the interpreter. -Manipulation of any of the PL_*root pointers is protected by enclosing -LOCK_SV_MUTEX; ... UNLOCK_SV_MUTEX calls which should Do the Right Thing -if threads are enabled. - The function visit() scans the SV arenas list, and calls a specified function for each SV it finds which is still live - ie which has an SvTYPE other than all 1's, and a non-zero SvREFCNT. visit() is used by the @@ -157,17 +153,12 @@ Public API: * "A time to plant, and a time to uproot what was planted..." */ -/* - * nice_chunk and nice_chunk size need to be set - * and queried under the protection of sv_mutex - */ void Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size) { dVAR; void *new_chunk; U32 new_chunk_size; - LOCK_SV_MUTEX; new_chunk = (void *)(chunk); new_chunk_size = (chunk_size); if (new_chunk_size > PL_nice_chunk_size) { @@ -177,7 +168,6 @@ Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size) } else { Safefree(chunk); } - UNLOCK_SV_MUTEX; } #ifdef DEBUG_LEAKING_SCALARS @@ -209,7 +199,6 @@ Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size) --PL_sv_count; \ } STMT_END -/* sv_mutex must be held while calling uproot_SV() */ #define uproot_SV(p) \ STMT_START { \ (p) = PL_sv_root; \ @@ -220,7 +209,6 @@ Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size) /* make some more SVs by adding another arena */ -/* sv_mutex must be held while calling more_sv() */ STATIC SV* S_more_sv(pTHX) { @@ -250,12 +238,10 @@ S_new_SV(pTHX) { SV* sv; - LOCK_SV_MUTEX; if (PL_sv_root) uproot_SV(sv); else sv = S_more_sv(aTHX); - UNLOCK_SV_MUTEX; SvANY(sv) = 0; SvREFCNT(sv) = 1; SvFLAGS(sv) = 0; @@ -273,12 +259,10 @@ S_new_SV(pTHX) #else # define new_SV(p) \ STMT_START { \ - LOCK_SV_MUTEX; \ if (PL_sv_root) \ uproot_SV(p); \ else \ (p) = S_more_sv(aTHX); \ - UNLOCK_SV_MUTEX; \ SvANY(p) = 0; \ SvREFCNT(p) = 1; \ SvFLAGS(p) = 0; \ @@ -292,12 +276,10 @@ S_new_SV(pTHX) #define del_SV(p) \ STMT_START { \ - LOCK_SV_MUTEX; \ if (DEBUG_D_TEST) \ del_sv(p); \ else \ plant_SV(p); \ - UNLOCK_SV_MUTEX; \ } STMT_END STATIC void @@ -720,10 +702,8 @@ Perl_get_arena(pTHX_ size_t arena_size, U32 misc) #define del_body(thing, root) \ STMT_START { \ void ** const thing_copy = (void **)thing;\ - LOCK_SV_MUTEX; \ *thing_copy = *root; \ *root = (void*)thing_copy; \ - UNLOCK_SV_MUTEX; \ } STMT_END /* @@ -1094,11 +1074,9 @@ S_more_bodies (pTHX_ svtype sv_type) #define new_body_inline(xpv, sv_type) \ STMT_START { \ void ** const r3wt = &PL_body_roots[sv_type]; \ - LOCK_SV_MUTEX; \ xpv = (PTR_TBL_ENT_t*) (*((void **)(r3wt)) \ ? *((void **)(r3wt)) : more_bodies(sv_type)); \ *(r3wt) = *(void**)(xpv); \ - UNLOCK_SV_MUTEX; \ } STMT_END #ifndef PURIFY |