diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 05:10:50 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 05:10:50 +0000 |
commit | 5c0ca7990f0d90291b9a3d0b6c57bae560b23b52 (patch) | |
tree | 26fb0eee534215ebaa9caa2327d1ee6ac37d3bb7 /util.c | |
parent | 8b49bb9af6b73f5b844abedd87486b1c41fc6b01 (diff) | |
download | perl-5c0ca7990f0d90291b9a3d0b6c57bae560b23b52.tar.gz |
make RE engine threadsafe; -Dusethreads builds, tests on Solaris,
and runs regexes in 1000s of threads without crashing; also fixed
statcache not being thread-local
p4raw-id: //depot/perl@1448
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1062,6 +1062,7 @@ fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr, U32 char * screaminstr(SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift, I32 *old_posp, I32 last) { + dTHR; register unsigned char *s, *x; register unsigned char *big; register I32 pos; @@ -2791,6 +2792,17 @@ new_struct_thread(struct perl_thread *t) formtarget = newSVsv(t->Tformtarget); bodytarget = newSVsv(t->Tbodytarget); toptarget = newSVsv(t->Ttoptarget); + + statname = NEWSV(66,0); + maxscream = -1; + regcompp = FUNC_NAME_TO_PTR(pregcomp); + regexecp = FUNC_NAME_TO_PTR(regexec_flags); + regindent = 0; + reginterp_cnt = 0; + lastscream = Nullsv; + screamfirst = 0; + screamnext = 0; + reg_start_tmp = 0; /* Initialise all per-thread SVs that the template thread used */ svp = AvARRAY(t->threadsv); |