diff options
-rw-r--r-- | NetWare/config_H.wc | 2 | ||||
-rw-r--r-- | NetWare/nw5thread.c | 6 | ||||
-rw-r--r-- | NetWare/nw5thread.h | 2 | ||||
-rw-r--r-- | Porting/Glossary | 2 | ||||
-rw-r--r-- | Porting/config_H | 2 | ||||
-rw-r--r-- | README.threads | 2 | ||||
-rw-r--r-- | config_h.SH | 2 | ||||
-rw-r--r-- | cop.h | 8 | ||||
-rw-r--r-- | cv.h | 8 | ||||
-rw-r--r-- | deb.c | 8 | ||||
-rw-r--r-- | dosish.h | 2 | ||||
-rw-r--r-- | dump.c | 4 | ||||
-rw-r--r-- | embed.h | 42 | ||||
-rwxr-xr-x | embed.pl | 32 | ||||
-rw-r--r-- | embedvar.h | 18 | ||||
-rw-r--r-- | ext/B/B.xs | 2 | ||||
-rw-r--r-- | ext/B/B/C.pm | 4 | ||||
-rw-r--r-- | ext/B/B/Deparse.pm | 2 | ||||
-rw-r--r-- | ext/B/ramblings/runtime.porting | 2 | ||||
-rw-r--r-- | ext/DynaLoader/dl_aix.xs | 4 | ||||
-rw-r--r-- | ext/Thread/Thread.xs | 30 | ||||
-rw-r--r-- | gv.c | 10 | ||||
-rw-r--r-- | intrpvar.h | 12 | ||||
-rw-r--r-- | mg.c | 12 | ||||
-rw-r--r-- | miniperlmain.c | 2 | ||||
-rw-r--r-- | objXSUB.h | 14 | ||||
-rw-r--r-- | op.c | 80 | ||||
-rw-r--r-- | os2/os2.c | 4 | ||||
-rw-r--r-- | os2/os2ish.h | 6 | ||||
-rw-r--r-- | perl.c | 54 | ||||
-rw-r--r-- | perl.h | 56 | ||||
-rw-r--r-- | perlapi.c | 14 | ||||
-rw-r--r-- | perlvars.h | 4 | ||||
-rw-r--r-- | pod/perlguts.pod | 8 | ||||
-rw-r--r-- | pp.c | 16 | ||||
-rw-r--r-- | pp.h | 4 | ||||
-rw-r--r-- | pp_ctl.c | 62 | ||||
-rw-r--r-- | pp_hot.c | 32 | ||||
-rw-r--r-- | proto.h | 14 | ||||
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | scope.c | 8 | ||||
-rw-r--r-- | sv.c | 8 | ||||
-rw-r--r-- | sv.h | 14 | ||||
-rw-r--r-- | thrdvar.h | 12 | ||||
-rw-r--r-- | thread.h | 8 | ||||
-rw-r--r-- | toke.c | 16 | ||||
-rw-r--r-- | uconfig.h | 2 | ||||
-rw-r--r-- | util.c | 22 | ||||
-rw-r--r-- | vms/genconfig.pl | 8 | ||||
-rw-r--r-- | vms/vms.c | 8 | ||||
-rw-r--r-- | vos/config.alpha.h | 2 | ||||
-rw-r--r-- | vos/config.ga.h | 2 | ||||
-rw-r--r-- | win32/config_H.bc | 2 | ||||
-rw-r--r-- | win32/config_H.gc | 2 | ||||
-rw-r--r-- | win32/config_H.vc | 2 | ||||
-rw-r--r-- | win32/perllib.c | 2 | ||||
-rw-r--r-- | win32/win32.h | 10 | ||||
-rw-r--r-- | win32/win32sck.c | 6 | ||||
-rw-r--r-- | win32/win32thread.c | 6 | ||||
-rw-r--r-- | win32/win32thread.h | 4 | ||||
-rw-r--r-- | wince/config.h | 2 | ||||
-rw-r--r-- | wince/config_H.ce | 2 | ||||
-rw-r--r-- | wince/win32.h | 10 | ||||
-rw-r--r-- | wince/win32thread.c | 6 | ||||
-rw-r--r-- | wince/win32thread.h | 4 | ||||
-rw-r--r-- | wince/wincesck.c | 2 |
66 files changed, 380 insertions, 380 deletions
diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index eb3c2e0e5f..f10a79811a 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -3220,7 +3220,7 @@ /*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/NetWare/nw5thread.c b/NetWare/nw5thread.c index 5cfa1801fc..e99512afbf 100644 --- a/NetWare/nw5thread.c +++ b/NetWare/nw5thread.c @@ -38,7 +38,7 @@ __declspec(thread) void *PL_current_context = NULL; void Perl_set_context(void *t) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD Perl_current_context = t; # else @@ -51,7 +51,7 @@ Perl_set_context(void *t) void * Perl_get_context(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD return Perl_current_context; # else @@ -67,7 +67,7 @@ Perl_get_context(void) BOOL Remove_Thread_Ctx(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD return TRUE; # else diff --git a/NetWare/nw5thread.h b/NetWare/nw5thread.h index 895338c687..58e1596c3c 100644 --- a/NetWare/nw5thread.h +++ b/NetWare/nw5thread.h @@ -27,7 +27,7 @@ typedef long perl_key; -#if (defined (USE_ITHREADS) || defined (USE_THREADS)) && defined(MPK_ON) +#if (defined (USE_ITHREADS) || defined (USE_5005THREADS)) && defined(MPK_ON) #ifdef __cplusplus extern "C" { diff --git a/Porting/Glossary b/Porting/Glossary index 3ffbdcc876..a706e72eed 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -3867,7 +3867,7 @@ usesocks (usesocks.U): and indicates that Perl should be built to use SOCKS. usethreads (usethreads.U): - This variable conditionally defines the USE_THREADS symbol, + This variable conditionally defines the USE_5005THREADS symbol, and indicates that Perl should be built to use threads. usevendorprefix (vendorprefix.U): diff --git a/Porting/config_H b/Porting/config_H index 896a878699..ab8b863e40 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -3348,7 +3348,7 @@ /*#define USE_5005THREADS / **/ /*#define USE_ITHREADS / **/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API / **/ /*#define USE_REENTRANT_API / **/ diff --git a/README.threads b/README.threads index 15d36de644..de95e10e66 100644 --- a/README.threads +++ b/README.threads @@ -217,7 +217,7 @@ multi-threading code. Under Linux, that also turns on a quick hack I did to grab a bit of extra information from segfaults. If you have a fancier gdb/threads setup than I do then you'll have to delete the lines in perl.c which say - #if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__) + #if defined(DEBUGGING) && defined(USE_5005THREADS) && defined(__linux__) DEBUG_S(signal(SIGSEGV, (void(*)(int))catch_sigsegv);); #endif diff --git a/config_h.SH b/config_h.SH index 9290b75684..7c1eed1d5f 100644 --- a/config_h.SH +++ b/config_h.SH @@ -3368,7 +3368,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$use5005threads USE_5005THREADS /**/ #$useithreads USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif #$d_oldpthreads OLD_PTHREADS_API /**/ #$usereentrant USE_REENTRANT_API /**/ @@ -74,9 +74,9 @@ struct block_sub { CV * cv; GV * gv; GV * dfoutgv; -#ifndef USE_THREADS +#ifndef USE_5005THREADS AV * savearray; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ AV * argarray; U16 olddepth; U8 hasargs; @@ -98,7 +98,7 @@ struct block_sub { cx->blk_sub.dfoutgv = PL_defoutgv; \ (void)SvREFCNT_inc(cx->blk_sub.dfoutgv) -#ifdef USE_THREADS +#ifdef USE_5005THREADS # define POP_SAVEARRAY() NOOP #else # define POP_SAVEARRAY() \ @@ -106,7 +106,7 @@ struct block_sub { SvREFCNT_dec(GvAV(PL_defgv)); \ GvAV(PL_defgv) = cx->blk_sub.savearray; \ } STMT_END -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't * leave any (a fast av_clear(ary), basically) */ @@ -29,10 +29,10 @@ struct xpvcv { long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; -#ifdef USE_THREADS +#ifdef USE_5005THREADS perl_mutex *xcv_mutexp; struct perl_thread *xcv_owner; /* current owner thread */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cv_flags_t xcv_flags; }; @@ -64,10 +64,10 @@ Returns the stash of the CV. #define CvDEPTH(sv) ((XPVCV*)SvANY(sv))->xcv_depth #define CvPADLIST(sv) ((XPVCV*)SvANY(sv))->xcv_padlist #define CvOUTSIDE(sv) ((XPVCV*)SvANY(sv))->xcv_outside -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define CvMUTEXP(sv) ((XPVCV*)SvANY(sv))->xcv_mutexp #define CvOWNER(sv) ((XPVCV*)SvANY(sv))->xcv_owner -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define CvFLAGS(sv) ((XPVCV*)SvANY(sv))->xcv_flags #define CVf_CLONE 0x0001 /* anon CV uses external lexicals */ @@ -47,7 +47,7 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) #ifdef DEBUGGING char* file = CopFILE(PL_curcop); -#ifdef USE_THREADS +#ifdef USE_5005THREADS PerlIO_printf(Perl_debug_log, "0x%"UVxf" (%s:%ld)\t", PTR2UV(thr), (file ? file : "<free>"), @@ -55,7 +55,7 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) #else PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", (file ? file : "<free>"), (long)CopLINE(PL_curcop)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ (void) PerlIO_vprintf(Perl_debug_log, pat, *args); #endif /* DEBUGGING */ } @@ -93,13 +93,13 @@ Perl_debstack(pTHX) if (*markscan >= i) break; -#ifdef USE_THREADS +#ifdef USE_5005THREADS PerlIO_printf(Perl_debug_log, i ? "0x%"UVxf" => ... " : "0x%lx => ", PTR2UV(thr)); #else PerlIO_printf(Perl_debug_log, i ? " => ... " : " => "); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (PL_stack_base[0] != &PL_sv_undef || PL_stack_sp < PL_stack_base) PerlIO_printf(Perl_debug_log, " [STACK UNDERFLOW!!!]\n"); do { @@ -16,7 +16,7 @@ # if (DJGPP==2 && DJGPP_MINOR < 2) # define NO_LOCALECONV_MON_THOUSANDS_SEP # endif -# ifdef USE_THREADS +# ifdef USE_5005THREADS # define OLD_PTHREADS_API # endif # define PERL_FS_VER_FMT "%d_%d_%d" @@ -1253,10 +1253,10 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv)); Perl_dump_indent(aTHX_ level, file, " FILE = \"%s\"\n", CvFILE(sv)); Perl_dump_indent(aTHX_ level, file, " DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv)); -#ifdef USE_THREADS +#ifdef USE_5005THREADS Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv))); Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%"UVxf"\n", PTR2UV(CvOWNER(sv))); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%"UVxf"\n", (UV)CvFLAGS(sv)); if (type == SVt_PVFM) Perl_dump_indent(aTHX_ level, file, " LINES = %"IVdf"\n", (IV)FmLINES(sv)); @@ -111,7 +111,7 @@ #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) #define my_chsize Perl_my_chsize #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define condpair_magic Perl_condpair_magic #endif #define convert Perl_convert @@ -213,7 +213,7 @@ #define fbm_compile Perl_fbm_compile #define fbm_instr Perl_fbm_instr #define find_script Perl_find_script -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define find_threadsv Perl_find_threadsv #endif #define force_list Perl_force_list @@ -366,7 +366,7 @@ #define magic_getuvar Perl_magic_getuvar #define magic_getvec Perl_magic_getvec #define magic_len Perl_magic_len -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define magic_mutexfree Perl_magic_mutexfree #endif #define magic_nextpack Perl_magic_nextpack @@ -524,7 +524,7 @@ #define peep Perl_peep #if defined(PERL_OBJECT) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define new_struct_thread Perl_new_struct_thread #endif #define call_atexit Perl_call_atexit @@ -736,7 +736,7 @@ #if defined(UNLINK_ALL_VERSIONS) #define unlnk Perl_unlnk #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define unlock_condpair Perl_unlock_condpair #endif #define unsharepvn Perl_unsharepvn @@ -793,7 +793,7 @@ #endif #define runops_standard Perl_runops_standard #define runops_debug Perl_runops_debug -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define sv_lock Perl_sv_lock #endif #define sv_catpvf_mg Perl_sv_catpvf_mg @@ -964,7 +964,7 @@ #define vcall_body S_vcall_body #define vcall_list_body S_vcall_list_body #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) #define init_main_thread S_init_main_thread # endif #endif @@ -1656,7 +1656,7 @@ #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) #define my_chsize(a,b) Perl_my_chsize(aTHX_ a,b) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define condpair_magic(a) Perl_condpair_magic(aTHX_ a) #endif #define convert(a,b,c) Perl_convert(aTHX_ a,b,c) @@ -1740,7 +1740,7 @@ #define fbm_compile(a,b) Perl_fbm_compile(aTHX_ a,b) #define fbm_instr(a,b,c,d) Perl_fbm_instr(aTHX_ a,b,c,d) #define find_script(a,b,c,d) Perl_find_script(aTHX_ a,b,c,d) -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define find_threadsv(a) Perl_find_threadsv(aTHX_ a) #endif #define force_list(a) Perl_force_list(aTHX_ a) @@ -1891,7 +1891,7 @@ #define magic_getuvar(a,b) Perl_magic_getuvar(aTHX_ a,b) #define magic_getvec(a,b) Perl_magic_getvec(aTHX_ a,b) #define magic_len(a,b) Perl_magic_len(aTHX_ a,b) -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define magic_mutexfree(a,b) Perl_magic_mutexfree(aTHX_ a,b) #endif #define magic_nextpack(a,b,c) Perl_magic_nextpack(aTHX_ a,b,c) @@ -2047,7 +2047,7 @@ #define peep(a) Perl_peep(aTHX_ a) #if defined(PERL_OBJECT) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define new_struct_thread(a) Perl_new_struct_thread(aTHX_ a) #endif #define call_atexit(a,b) Perl_call_atexit(aTHX_ a,b) @@ -2257,7 +2257,7 @@ #if defined(UNLINK_ALL_VERSIONS) #define unlnk(a) Perl_unlnk(aTHX_ a) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define unlock_condpair(a) Perl_unlock_condpair(aTHX_ a) #endif #define unsharepvn(a,b,c) Perl_unsharepvn(aTHX_ a,b,c) @@ -2312,7 +2312,7 @@ #endif #define runops_standard() Perl_runops_standard(aTHX) #define runops_debug() Perl_runops_debug(aTHX) -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define sv_lock(a) Perl_sv_lock(aTHX_ a) #endif #define sv_vcatpvf_mg(a,b,c) Perl_sv_vcatpvf_mg(aTHX_ a,b,c) @@ -2479,7 +2479,7 @@ #define vcall_body(a) S_vcall_body(aTHX_ a) #define vcall_list_body(a) S_vcall_list_body(aTHX_ a) #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) #define init_main_thread() S_init_main_thread(aTHX) # endif #endif @@ -3218,7 +3218,7 @@ #define Perl_my_chsize CPerlObj::Perl_my_chsize #define my_chsize Perl_my_chsize #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_condpair_magic CPerlObj::Perl_condpair_magic #define condpair_magic Perl_condpair_magic #endif @@ -3412,7 +3412,7 @@ #define fbm_instr Perl_fbm_instr #define Perl_find_script CPerlObj::Perl_find_script #define find_script Perl_find_script -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_find_threadsv CPerlObj::Perl_find_threadsv #define find_threadsv Perl_find_threadsv #endif @@ -3714,7 +3714,7 @@ #define magic_getvec Perl_magic_getvec #define Perl_magic_len CPerlObj::Perl_magic_len #define magic_len Perl_magic_len -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_magic_mutexfree CPerlObj::Perl_magic_mutexfree #define magic_mutexfree Perl_magic_mutexfree #endif @@ -4017,7 +4017,7 @@ #define Perl_run CPerlObj::Perl_run #define Perl_parse CPerlObj::Perl_parse #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_new_struct_thread CPerlObj::Perl_new_struct_thread #define new_struct_thread Perl_new_struct_thread #endif @@ -4441,7 +4441,7 @@ #define Perl_unlnk CPerlObj::Perl_unlnk #define unlnk Perl_unlnk #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_unlock_condpair CPerlObj::Perl_unlock_condpair #define unlock_condpair Perl_unlock_condpair #endif @@ -4545,7 +4545,7 @@ #define runops_standard Perl_runops_standard #define Perl_runops_debug CPerlObj::Perl_runops_debug #define runops_debug Perl_runops_debug -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #define Perl_sv_lock CPerlObj::Perl_sv_lock #define sv_lock Perl_sv_lock #endif @@ -4855,7 +4855,7 @@ #define S_vcall_list_body CPerlObj::S_vcall_list_body #define vcall_list_body S_vcall_list_body #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) #define S_init_main_thread CPerlObj::S_init_main_thread #define init_main_thread S_init_main_thread # endif @@ -554,13 +554,13 @@ print EM <<'END'; /* (Doing namespace management portably in C is really gross.) */ /* - The following combinations of MULTIPLICITY, USE_THREADS, PERL_OBJECT + The following combinations of MULTIPLICITY, USE_5005THREADS, PERL_OBJECT and PERL_IMPLICIT_CONTEXT are supported: 1) none 2) MULTIPLICITY # supported for compatibility 3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT - 4) USE_THREADS && PERL_IMPLICIT_CONTEXT - 5) MULTIPLICITY && USE_THREADS && PERL_IMPLICIT_CONTEXT + 4) USE_5005THREADS && PERL_IMPLICIT_CONTEXT + 5) MULTIPLICITY && USE_5005THREADS && PERL_IMPLICIT_CONTEXT 6) PERL_OBJECT && PERL_IMPLICIT_CONTEXT All other combinations of these flags are errors. @@ -590,7 +590,7 @@ print EM <<'END'; # include "error: PERL_OBJECT + MULTIPLICITY don't go together" # endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) /* case 5 above */ END @@ -601,7 +601,7 @@ for $sym (sort keys %intrp) { print EM <<'END'; -# else /* !USE_THREADS */ +# else /* !USE_5005THREADS */ /* cases 2 and 3 above */ END @@ -612,7 +612,7 @@ for $sym (sort keys %intrp) { print EM <<'END'; -# endif /* USE_THREADS */ +# endif /* USE_5005THREADS */ #else /* !MULTIPLICITY */ @@ -644,7 +644,7 @@ for $sym (sort keys %intrp) { print EM <<'END'; -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) /* case 4 above */ END @@ -655,7 +655,7 @@ for $sym (sort keys %thread) { print EM <<'END'; -# else /* !USE_THREADS */ +# else /* !USE_5005THREADS */ /* case 1 above */ END @@ -666,7 +666,7 @@ for $sym (sort keys %thread) { print EM <<'END'; -# endif /* USE_THREADS */ +# endif /* USE_5005THREADS */ # endif /* PERL_OBJECT */ #endif /* MULTIPLICITY */ @@ -1433,7 +1433,7 @@ Ap |UV |cast_uv |NV f #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) Ap |I32 |my_chsize |int fd|Off_t length #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) Ap |MAGIC* |condpair_magic |SV *sv #endif p |OP* |convert |I32 optype|I32 flags|OP* o @@ -1543,7 +1543,7 @@ Apd |char* |fbm_instr |unsigned char* big|unsigned char* bigend \ |SV* littlesv|U32 flags p |char* |find_script |char *scriptname|bool dosearch \ |char **search_ext|I32 flags -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) p |PADOFFSET|find_threadsv|const char *name #endif p |OP* |force_list |OP* arg @@ -1701,7 +1701,7 @@ p |int |magic_gettaint |SV* sv|MAGIC* mg p |int |magic_getuvar |SV* sv|MAGIC* mg p |int |magic_getvec |SV* sv|MAGIC* mg p |U32 |magic_len |SV* sv|MAGIC* mg -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) p |int |magic_mutexfree|SV* sv|MAGIC* mg #endif p |int |magic_nextpack |SV* sv|MAGIC* mg|SV* key @@ -1870,7 +1870,7 @@ Aox |int |Perl_run Aox |int |Perl_parse |XSINIT_t xsinit \ |int argc|char** argv|char** env #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) Ap |struct perl_thread* |new_struct_thread|struct perl_thread *t #endif Ap |void |call_atexit |ATEXIT_t fn|void *ptr @@ -2103,7 +2103,7 @@ Ap |UV |to_utf8_title |U8 *p #if defined(UNLINK_ALL_VERSIONS) Ap |I32 |unlnk |char* f #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) Ap |void |unlock_condpair|void* svv #endif Ap |void |unsharepvn |const char* sv|I32 len|U32 hash @@ -2160,7 +2160,7 @@ Ap |struct perl_vars *|GetVars #endif Ap |int |runops_standard Ap |int |runops_debug -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) Ap |SV* |sv_lock |SV *sv #endif Afpd |void |sv_catpvf_mg |SV *sv|const char* pat|... @@ -2363,7 +2363,7 @@ s |void* |vrun_body |va_list args s |void* |vcall_body |va_list args s |void* |vcall_list_body|va_list args #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) s |struct perl_thread * |init_main_thread # endif #endif diff --git a/embedvar.h b/embedvar.h index b5c6340148..3af647c4b2 100644 --- a/embedvar.h +++ b/embedvar.h @@ -6,13 +6,13 @@ /* (Doing namespace management portably in C is really gross.) */ /* - The following combinations of MULTIPLICITY, USE_THREADS, PERL_OBJECT + The following combinations of MULTIPLICITY, USE_5005THREADS, PERL_OBJECT and PERL_IMPLICIT_CONTEXT are supported: 1) none 2) MULTIPLICITY # supported for compatibility 3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT - 4) USE_THREADS && PERL_IMPLICIT_CONTEXT - 5) MULTIPLICITY && USE_THREADS && PERL_IMPLICIT_CONTEXT + 4) USE_5005THREADS && PERL_IMPLICIT_CONTEXT + 5) MULTIPLICITY && USE_5005THREADS && PERL_IMPLICIT_CONTEXT 6) PERL_OBJECT && PERL_IMPLICIT_CONTEXT All other combinations of these flags are errors. @@ -170,7 +170,7 @@ # include "error: PERL_OBJECT + MULTIPLICITY don't go together" # endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) /* case 5 above */ #define PL_Argv (PERL_GET_INTERP->IArgv) @@ -456,7 +456,7 @@ #define PL_yynerrs (PERL_GET_INTERP->Iyynerrs) #define PL_yyval (PERL_GET_INTERP->Iyyval) -# else /* !USE_THREADS */ +# else /* !USE_5005THREADS */ /* cases 2 and 3 above */ #define PL_Argv (vTHX->IArgv) @@ -742,7 +742,7 @@ #define PL_yynerrs (vTHX->Iyynerrs) #define PL_yyval (vTHX->Iyyval) -# endif /* USE_THREADS */ +# endif /* USE_5005THREADS */ #else /* !MULTIPLICITY */ @@ -1454,7 +1454,7 @@ #define PL_Iyynerrs PL_yynerrs #define PL_Iyyval PL_yyval -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) /* case 4 above */ #define PL_Sv (aTHX->TSv) @@ -1593,7 +1593,7 @@ #define PL_watchaddr (aTHX->Twatchaddr) #define PL_watchok (aTHX->Twatchok) -# else /* !USE_THREADS */ +# else /* !USE_5005THREADS */ /* case 1 above */ #define PL_TSv PL_Sv @@ -1732,7 +1732,7 @@ #define PL_Twatchaddr PL_watchaddr #define PL_Twatchok PL_watchok -# endif /* USE_THREADS */ +# endif /* USE_5005THREADS */ # endif /* PERL_OBJECT */ #endif /* MULTIPLICITY */ diff --git a/ext/B/B.xs b/ext/B/B.xs index c3ce0ed43e..f27f3474ff 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -549,7 +549,7 @@ cchar(sv) void threadsv_names() PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS int i; STRLEN len = strlen(PL_threadsv_names); diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index f8df7b65a2..71b76b53ed 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -1062,10 +1062,10 @@ typedef struct { long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; -#ifdef USE_THREADS +#ifdef USE_5005THREADS perl_mutex *xcv_mutexp; struct perl_thread *xcv_owner; /* current owner thread */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cv_flags_t xcv_flags; } XPVCV_or_similar; #define ANYINIT(i) i diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 11803c8ee9..b02b9e1b97 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -35,7 +35,7 @@ use warnings (); # - package declarations using cop_stash # - subs, formats and code sorted by cop_seq # Changes between 0.51 and 0.52: -# - added pp_threadsv (special variables under USE_THREADS) +# - added pp_threadsv (special variables under USE_5005THREADS) # - added documentation # Changes between 0.52 and 0.53: # - many changes adding precedence contexts and associativity diff --git a/ext/B/ramblings/runtime.porting b/ext/B/ramblings/runtime.porting index d58b01105e..2f63a9e37c 100644 --- a/ext/B/ramblings/runtime.porting +++ b/ext/B/ramblings/runtime.porting @@ -352,6 +352,6 @@ egrent getlogin syscall lock 6 1 -threadsv 6 2 unused if not USE_THREADS +threadsv 6 2 unused if not USE_5005THREADS setstate 1 1 currently unused anywhere method_named 10 2 diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs index 9334a15c97..6f9b1eafea 100644 --- a/ext/DynaLoader/dl_aix.xs +++ b/ext/DynaLoader/dl_aix.xs @@ -165,7 +165,7 @@ char *strerrorcat(char *str, int err) { int msgsiz; char *msg; -#ifdef USE_THREADS +#ifdef USE_5005THREADS char *buf = malloc(BUFSIZ); if (buf == 0) @@ -193,7 +193,7 @@ char *strerrorcpy(char *str, int err) { int msgsiz; char *msg; -#ifdef USE_THREADS +#ifdef USE_5005THREADS char *buf = malloc(BUFSIZ); if (buf == 0) diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index 4816efcfe4..c008160538 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -23,7 +23,7 @@ static int sig_pipe[2]; static void remove_thread(pTHX_ Thread t) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_S(WITH_THR(PerlIO_printf(Perl_debug_log, "%p: remove_thread %p\n", thr, t))); MUTEX_LOCK(&PL_threads_mutex); @@ -40,7 +40,7 @@ remove_thread(pTHX_ Thread t) static THREAD_RET_TYPE threadstart(void *arg) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS #ifdef FAKE_THREADS Thread savethread = thr; LOGOP myop; @@ -228,7 +228,7 @@ threadstart(void *arg) static SV * newthread (pTHX_ SV *startsv, AV *initargs, char *classname) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS dSP; Thread savethread; int i; @@ -370,7 +370,7 @@ join(t) AV * av = NO_INIT int i = NO_INIT PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (t == thr) croak("Attempt to join self"); DEBUG_S(PerlIO_printf(Perl_debug_log, "%p: joining %p (state %u)\n", @@ -415,7 +415,7 @@ void detach(t) Thread t CODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_S(PerlIO_printf(Perl_debug_log, "%p: detaching %p (state %u)\n", thr, t, ThrSTATE(t))); MUTEX_LOCK(&t->mutex); @@ -451,7 +451,7 @@ void flags(t) Thread t PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS PUSHs(sv_2mortal(newSViv(t->flags))); #endif @@ -459,7 +459,7 @@ void done(t) Thread t PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS PUSHs(t->thr_done ? &PL_sv_yes : &PL_sv_no); #endif @@ -469,7 +469,7 @@ self(classname) PREINIT: SV *sv; PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS sv = newSViv(thr->tid); sv_magic(sv, thr->oursv, '~', 0, 0); SvMAGIC(sv)->mg_private = Thread_MAGIC_SIGNATURE; @@ -481,7 +481,7 @@ U32 tid(t) Thread t CODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_LOCK(&t->mutex); RETVAL = t->tid; MUTEX_UNLOCK(&t->mutex); @@ -501,7 +501,7 @@ void yield() CODE: { -#ifdef USE_THREADS +#ifdef USE_5005THREADS YIELD; #endif } @@ -511,7 +511,7 @@ cond_wait(sv) SV * sv MAGIC * mg = NO_INIT CODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (SvROK(sv)) sv = SvRV(sv); @@ -536,7 +536,7 @@ cond_signal(sv) SV * sv MAGIC * mg = NO_INIT CODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (SvROK(sv)) sv = SvRV(sv); @@ -556,7 +556,7 @@ cond_broadcast(sv) SV * sv MAGIC * mg = NO_INIT CODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (SvROK(sv)) sv = SvRV(sv); @@ -581,7 +581,7 @@ list(classname) SV ** svp; int n = 0; PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS av = newAV(); /* * Iterate until we have enough dynamic storage for all threads. @@ -673,7 +673,7 @@ void data(classname = "Thread::Specific") char * classname PPCODE: -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (AvFILL(thr->specific) == -1) { GV *gv = gv_fetchpv("Thread::Specific::FIELDS", TRUE, SVt_PVHV); av_store(thr->specific, 0, newRV((SV*)GvHV(gv))); @@ -128,13 +128,13 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) CvGV(GvCV(gv)) = gv; CvFILE_set_from_cop(GvCV(gv), PL_curcop); CvSTASH(GvCV(gv)) = PL_curstash; -#ifdef USE_THREADS +#ifdef USE_5005THREADS CvOWNER(GvCV(gv)) = 0; if (!CvMUTEXP(GvCV(gv))) { New(666, CvMUTEXP(GvCV(gv)), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(GvCV(gv))); } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (proto) { sv_setpv((SV*)GvCV(gv), proto); Safefree(proto); @@ -439,7 +439,7 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", HvNAME(stash), (int)len, name); -#ifndef USE_THREADS +#ifndef USE_5005THREADS if (CvXSUB(cv)) { /* rather than lookup/init $AUTOLOAD here * only to have the XSUB do another lookup for $AUTOLOAD @@ -463,14 +463,14 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) vargv = *(GV**)hv_fetch(varstash, autoload, autolen, TRUE); ENTER; -#ifdef USE_THREADS +#ifdef USE_5005THREADS sv_lock((SV *)varstash); #endif if (!isGV(vargv)) gv_init(vargv, varstash, autoload, autolen, FALSE); LEAVE; varsv = GvSV(vargv); -#ifdef USE_THREADS +#ifdef USE_5005THREADS sv_lock(varsv); #endif sv_setpv(varsv, HvNAME(stash)); diff --git a/intrpvar.h b/intrpvar.h index 8a92d7dc39..fd39a09f87 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -78,7 +78,7 @@ PERLVAR(Iargvout_stack, AV *) /* shortcuts to regexp stuff */ /* this one needs to be moved to thrdvar.h and accessed via - * find_threadsv() when USE_THREADS */ + * find_threadsv() when USE_5005THREADS */ PERLVAR(Ireplgv, GV *) /* shortcuts to misc objects */ @@ -220,11 +220,11 @@ PERLVAR(Ilinestart, char *) /* beg. of most recently read line */ PERLVAR(Ipending_ident, char) /* pending identifier lookup */ PERLVAR(Isublex_info, SUBLEXINFO) /* from toke.c */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */ PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */ PERLVAR(Istrtab_mutex, perl_mutex) /* Mutex for string table access */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PERLVAR(Iuid, Uid_t) /* current real user id */ PERLVAR(Ieuid, Uid_t) /* current effective user id */ @@ -404,7 +404,7 @@ PERLVAR(Isrand_called, bool) PERLVARA(Iuudmap,256, char) PERLVAR(Ibitcount, char *) -#ifdef USE_THREADS +#ifdef USE_5005THREADS PERLVAR(Isv_mutex, perl_mutex) /* Mutex for allocating SVs in sv.c */ PERLVAR(Ieval_mutex, perl_mutex) /* Mutex for doeval */ PERLVAR(Ieval_cond, perl_cond) /* Condition variable for doeval */ @@ -422,7 +422,7 @@ PERLVAR(Icurthr, struct perl_thread *) PERLVAR(Icred_mutex, perl_mutex) /* altered credentials in effect */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PERLVAR(Ipsig_ptr, SV**) PERLVAR(Ipsig_name, SV**) @@ -444,7 +444,7 @@ PERLVAR(Iptr_table, PTR_TBL_t*) #endif PERLVARI(Ibeginav_save, AV*, Nullav) /* save BEGIN{}s when compiling */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS PERLVAR(Ifdpid_mutex, perl_mutex) /* mutex for fdpid array */ PERLVAR(Isv_lock_mutex, perl_mutex) /* mutex for SvLOCK macro */ #endif @@ -825,11 +825,11 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) case '0': break; #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS case '@': sv_setsv(sv, thr->errsv); break; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ } return 0; } @@ -2175,16 +2175,16 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) } break; #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS case '@': sv_setsv(thr->errsv, sv); break; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ } return 0; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS int Perl_magic_mutexfree(pTHX_ SV *sv, MAGIC *mg) { @@ -2197,7 +2197,7 @@ Perl_magic_mutexfree(pTHX_ SV *sv, MAGIC *mg) COND_DESTROY(MgCONDP(mg)); return 0; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ I32 Perl_whichsig(pTHX_ char *sig) diff --git a/miniperlmain.c b/miniperlmain.c index 9995b2b732..eec3993ca6 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -48,7 +48,7 @@ main(int argc, char **argv, char **env) PERL_SYS_INIT3(&argc,&argv,&env); -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) /* XXX Ideally, this should really be happening in perl_alloc() or * perl_construct() to keep libperl.a transparently fork()-safe. * It is currently done here only because Apache/mod_perl have @@ -157,7 +157,7 @@ #undef my_chsize #define my_chsize Perl_my_chsize #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_condpair_magic #define Perl_condpair_magic pPerl->Perl_condpair_magic #undef condpair_magic @@ -383,7 +383,7 @@ #define Perl_fbm_instr pPerl->Perl_fbm_instr #undef fbm_instr #define fbm_instr Perl_fbm_instr -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #endif #undef Perl_form #define Perl_form pPerl->Perl_form @@ -819,7 +819,7 @@ #define Perl_grok_numeric_radix pPerl->Perl_grok_numeric_radix #undef grok_numeric_radix #define grok_numeric_radix Perl_grok_numeric_radix -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #endif #if defined(USE_LOCALE_COLLATE) #endif @@ -1209,7 +1209,7 @@ #undef Perl_parse #define Perl_parse pPerl->Perl_parse #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_new_struct_thread #define Perl_new_struct_thread pPerl->Perl_new_struct_thread #undef new_struct_thread @@ -1915,7 +1915,7 @@ #undef unlnk #define unlnk Perl_unlnk #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_unlock_condpair #define Perl_unlock_condpair pPerl->Perl_unlock_condpair #undef unlock_condpair @@ -2061,7 +2061,7 @@ #define Perl_runops_debug pPerl->Perl_runops_debug #undef runops_debug #define runops_debug Perl_runops_debug -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_sv_lock #define Perl_sv_lock pPerl->Perl_sv_lock #undef sv_lock @@ -2363,7 +2363,7 @@ # endif #if defined(PERL_FLEXIBLE_EXCEPTIONS) #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) # endif #endif #if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT) @@ -401,7 +401,7 @@ Perl_pad_findmy(pTHX_ char *name) PERL_CONTEXT *cx; CV *outside; -#ifdef USE_THREADS +#ifdef USE_5005THREADS /* * Special case to get lexical (and hence per-thread) @_. * XXX I need to find out how to tell at parse-time whether use @@ -412,7 +412,7 @@ Perl_pad_findmy(pTHX_ char *name) */ if (strEQ(name, "@_")) return 0; /* success. (NOT_IN_PAD indicates failure) */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* The one we're looking for is probably just before comppad_name_fill. */ for (off = AvFILLp(PL_comppad_name); off > 0; off--) { @@ -508,7 +508,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype) } SvFLAGS(sv) |= tmptype; PL_curpad = AvARRAY(PL_comppad); -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%"UVxf" Pad 0x%"UVxf" alloc %ld for %s\n", PTR2UV(thr), PTR2UV(PL_curpad), @@ -518,14 +518,14 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype) "Pad 0x%"UVxf" alloc %ld for %s\n", PTR2UV(PL_curpad), (long) retval, PL_op_name[optype])); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ return (PADOFFSET)retval; } SV * Perl_pad_sv(pTHX_ PADOFFSET po) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%"UVxf" Pad 0x%"UVxf" sv %"IVdf"\n", PTR2UV(thr), PTR2UV(PL_curpad), (IV)po)); @@ -534,7 +534,7 @@ Perl_pad_sv(pTHX_ PADOFFSET po) Perl_croak(aTHX_ "panic: pad_sv po"); DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" sv %"IVdf"\n", PTR2UV(PL_curpad), (IV)po)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ return PL_curpad[po]; /* eventually we'll turn this into a macro */ } @@ -547,14 +547,14 @@ Perl_pad_free(pTHX_ PADOFFSET po) Perl_croak(aTHX_ "panic: pad_free curpad"); if (!po) Perl_croak(aTHX_ "panic: pad_free po"); -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%"UVxf" Pad 0x%"UVxf" free %"IVdf"\n", PTR2UV(thr), PTR2UV(PL_curpad), (IV)po)); #else DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" free %"IVdf"\n", PTR2UV(PL_curpad), (IV)po)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (PL_curpad[po] && PL_curpad[po] != &PL_sv_undef) { SvPADTMP_off(PL_curpad[po]); #ifdef USE_ITHREADS @@ -572,14 +572,14 @@ Perl_pad_swipe(pTHX_ PADOFFSET po) Perl_croak(aTHX_ "panic: pad_swipe curpad"); if (!po) Perl_croak(aTHX_ "panic: pad_swipe po"); -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%"UVxf" Pad 0x%"UVxf" swipe %"IVdf"\n", PTR2UV(thr), PTR2UV(PL_curpad), (IV)po)); #else DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" swipe %"IVdf"\n", PTR2UV(PL_curpad), (IV)po)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ SvPADTMP_off(PL_curpad[po]); PL_curpad[po] = NEWSV(1107,0); SvPADTMP_on(PL_curpad[po]); @@ -601,14 +601,14 @@ Perl_pad_reset(pTHX) if (AvARRAY(PL_comppad) != PL_curpad) Perl_croak(aTHX_ "panic: pad_reset curpad"); -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%"UVxf" Pad 0x%"UVxf" reset\n", PTR2UV(thr), PTR2UV(PL_curpad))); #else DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" reset\n", PTR2UV(PL_curpad))); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (!PL_tainting) { /* Can't mix tainted and non-tainted temporaries. */ for (po = AvMAX(PL_comppad); po > PL_padix_floor; po--) { if (PL_curpad[po] && !SvIMMORTAL(PL_curpad[po])) @@ -620,7 +620,7 @@ Perl_pad_reset(pTHX) PL_pad_reset_pending = FALSE; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS /* find_threadsv is not reentrant */ PADOFFSET Perl_find_threadsv(pTHX_ const char *name) @@ -685,7 +685,7 @@ Perl_find_threadsv(pTHX_ const char *name) } return key; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* Destructor */ @@ -751,17 +751,17 @@ Perl_op_clear(pTHX_ OP *o) switch (o->op_type) { case OP_NULL: /* Was holding old type, if any. */ case OP_ENTEREVAL: /* Was holding hints. */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS case OP_THREADSV: /* Was holding index into thr->threadsv AV. */ #endif o->op_targ = 0; break; -#ifdef USE_THREADS +#ifdef USE_5005THREADS case OP_ENTERITER: if (!(o->op_flags & OPf_SPECIAL)) break; /* FALL THROUGH */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ default: if (!(o->op_flags & OPf_REF) || (PL_check[o->op_type] != MEMBER_TO_FPTR(Perl_ck_ftst))) @@ -1601,11 +1601,11 @@ Perl_mod(pTHX_ OP *o, I32 type) SvPV(*av_fetch(PL_comppad_name, o->op_targ, 4), n_a)); break; -#ifdef USE_THREADS +#ifdef USE_5005THREADS case OP_THREADSV: PL_modcount++; /* XXX ??? */ break; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ case OP_PUSHMARK: break; @@ -2168,13 +2168,13 @@ Perl_block_end(pTHX_ I32 floor, OP *seq) STATIC OP * S_newDEFSVOP(pTHX) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS OP *o = newOP(OP_THREADSV, 0); o->op_targ = find_threadsv("_"); return o; #else return newSVREF(newGVOP(OP_GV, 0, PL_defgv)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ } void @@ -2252,12 +2252,12 @@ Perl_jmaybe(pTHX_ OP *o) { if (o->op_type == OP_LIST) { OP *o2; -#ifdef USE_THREADS +#ifdef USE_5005THREADS o2 = newOP(OP_THREADSV, 0); o2->op_targ = find_threadsv(";"); #else o2 = newSVREF(newGVOP(OP_GV, 0, gv_fetchpv(";", TRUE, SVt_PV))), -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ o = convert(OP_JOIN, 0, prepend_elem(OP_LIST, o2, o)); } return o; @@ -3059,21 +3059,21 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl) if (CopLINE(PL_curcop) < PL_multi_end) CopLINE_set(PL_curcop, PL_multi_end); } -#ifdef USE_THREADS +#ifdef USE_5005THREADS else if (repl->op_type == OP_THREADSV && strchr("&`'123456789+", PL_threadsv_names[repl->op_targ])) { curop = 0; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ else if (repl->op_type == OP_CONST) curop = repl; else { OP *lastop = 0; for (curop = LINKLIST(repl); curop!=repl; curop = LINKLIST(curop)) { if (PL_opargs[curop->op_type] & OA_DANGEROUS) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (curop->op_type == OP_THREADSV) { repl_has_vars = 1; if (strchr("&`'123456789+", curop->op_private)) @@ -3086,7 +3086,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl) if (strchr("&`'123456789+", *GvENAME(gv))) break; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ else if (curop->op_type == OP_RV2CV) break; else if (curop->op_type == OP_RV2SV || @@ -4113,7 +4113,7 @@ Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *blo Perl_croak(aTHX_ "Can't use %s for loop variable", PL_op_desc[sv->op_type]); } else { -#ifdef USE_THREADS +#ifdef USE_5005THREADS padoff = find_threadsv("_"); iterflags |= OPf_SPECIAL; #else @@ -4205,13 +4205,13 @@ Perl_newLOOPEX(pTHX_ I32 type, OP *label) void Perl_cv_undef(pTHX_ CV *cv) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (CvMUTEXP(cv)) { MUTEX_DESTROY(CvMUTEXP(cv)); Safefree(CvMUTEXP(cv)); CvMUTEXP(cv) = 0; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef USE_ITHREADS if (CvFILE(cv) && !CvXSUB(cv)) { @@ -4222,13 +4222,13 @@ Perl_cv_undef(pTHX_ CV *cv) #endif if (!CvXSUB(cv) && CvROOT(cv)) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (CvDEPTH(cv) || (CvOWNER(cv) && CvOWNER(cv) != thr)) Perl_croak(aTHX_ "Can't undef active subroutine"); #else if (CvDEPTH(cv)) Perl_croak(aTHX_ "Can't undef active subroutine"); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ ENTER; SAVEVPTR(PL_curpad); @@ -4361,11 +4361,11 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside) CvFLAGS(cv) = CvFLAGS(proto) & ~CVf_CLONE; CvCLONED_on(cv); -#ifdef USE_THREADS +#ifdef USE_5005THREADS New(666, CvMUTEXP(cv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(cv)); CvOWNER(cv) = 0; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef USE_ITHREADS CvFILE(cv) = CvXSUB(proto) ? CvFILE(proto) : savepv(CvFILE(proto)); @@ -4809,13 +4809,13 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) CvGV(cv) = gv; CvFILE_set_from_cop(cv, PL_curcop); CvSTASH(cv) = PL_curstash; -#ifdef USE_THREADS +#ifdef USE_5005THREADS CvOWNER(cv) = 0; if (!CvMUTEXP(cv)) { New(666, CvMUTEXP(cv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(cv)); } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (ps) sv_setpv((SV*)cv, ps); @@ -5094,11 +5094,11 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename) } } CvGV(cv) = gv; -#ifdef USE_THREADS +#ifdef USE_5005THREADS New(666, CvMUTEXP(cv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(cv)); CvOWNER(cv) = 0; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ (void)gv_fetchfile(filename); CvFILE(cv) = filename; /* NOTE: not copied, as it is expected to be an external constant string */ @@ -6312,7 +6312,7 @@ Perl_ck_shift(pTHX_ OP *o) OP *argop; op_free(o); -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (!CvUNIQUE(PL_compcv)) { argop = newOP(OP_PADAV, OPf_REF); argop->op_targ = 0; /* PL_curpad[0] is @_ */ @@ -6326,7 +6326,7 @@ Perl_ck_shift(pTHX_ OP *o) argop = newUNOP(OP_RV2AV, 0, scalar(newGVOP(OP_GV, 0, !CvUNIQUE(PL_compcv) ? PL_defgv : gv_fetchpv("ARGV", TRUE, SVt_PVAV)))); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ return newUNOP(type, 0, scalar(argop)); } return scalar(modkids(ck_fun(o), type)); @@ -29,7 +29,7 @@ #include "EXTERN.h" #include "perl.h" -#ifdef USE_THREADS +#ifdef USE_5005THREADS typedef void (*emx_startroutine)(void *); typedef void* (*pthreads_startroutine)(void *); @@ -1391,7 +1391,7 @@ mod2fname(pTHX_ SV *sv) } avlen --; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS sum++; /* Avoid conflict of DLLs in memory. */ #endif /* We always load modules as *specific* DLLs, and with the full name. diff --git a/os2/os2ish.h b/os2/os2ish.h index ede75fb77c..68b4dd9820 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -99,7 +99,7 @@ # undef I_SYS_UN #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define do_spawn(a) os2_do_spawn(aTHX_ (a)) #define do_aspawn(a,b,c) os2_do_aspawn(aTHX_ (a),(b),(c)) @@ -202,12 +202,12 @@ int pthread_create(pthread_t *tid, const pthread_attr_t *attr, #define THREADS_ELSEWHERE -#else /* USE_THREADS */ +#else /* USE_5005THREADS */ #define do_spawn(a) os2_do_spawn(a) #define do_aspawn(a,b,c) os2_do_aspawn((a),(b),(c)) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ void Perl_OS2_init(char **); void Perl_OS2_init3(char **envp, void **excH, int flags); @@ -47,7 +47,7 @@ static I32 read_e_script(pTHXo_ int idx, SV *buf_sv, int maxlen); #define perl_free Perl_free #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) # define INIT_TLS_AND_INTERP \ STMT_START { \ if (!PL_curinterp) { \ @@ -148,11 +148,11 @@ Initializes a new Perl interpreter. See L<perlembed>. void perl_construct(pTHXx) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS #ifndef FAKE_THREADS struct perl_thread *thr = NULL; #endif /* FAKE_THREADS */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef MULTIPLICITY init_interp(); @@ -164,7 +164,7 @@ perl_construct(pTHXx) /* Init the real globals (and main thread)? */ if (!PL_linestr) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_INIT(&PL_sv_mutex); /* * Safe to use basic SV functions from now on (though @@ -183,7 +183,7 @@ perl_construct(pTHXx) MUTEX_INIT(&PL_fdpid_mutex); thr = init_main_thread(); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef PERL_FLEXIBLE_EXCEPTIONS PL_protect = MEMBER_TO_FPTR(Perl_default_protect); /* for exceptions */ @@ -308,15 +308,15 @@ perl_destruct(pTHXx) { int destruct_level; /* 0=none, 1=full, 2=full with checks */ HV *hv; -#ifdef USE_THREADS +#ifdef USE_5005THREADS Thread t; dTHX; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* wait for all pseudo-forked children to finish */ PERL_WAIT_FOR_CHILDREN; -#ifdef USE_THREADS +#ifdef USE_5005THREADS #ifndef FAKE_THREADS /* Pass 1 on any remaining threads: detach joinables, join zombies */ retry_cleanup: @@ -385,7 +385,7 @@ perl_destruct(pTHXx) COND_DESTROY(&PL_nthreads_cond); PL_nthreads--; #endif /* !defined(FAKE_THREADS) */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ destruct_level = PL_perl_destruct_level; #ifdef DEBUGGING @@ -810,7 +810,7 @@ perl_destruct(pTHXx) PL_hints = 0; /* Reset hints. Should hints be per-interpreter ? */ DEBUG_P(debprofdump()); -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_DESTROY(&PL_strtab_mutex); MUTEX_DESTROY(&PL_sv_mutex); MUTEX_DESTROY(&PL_eval_mutex); @@ -826,7 +826,7 @@ perl_destruct(pTHXx) Safefree(SvANY(PL_thrsv)); Safefree(PL_thrsv); PL_thrsv = Nullsv; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef USE_REENTRANT_API Safefree(PL_reentrant_buffer->tmbuff); @@ -925,7 +925,7 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, char **env) I32 oldscope; int ret; dJMPENV; -#ifdef USE_THREADS +#ifdef USE_5005THREADS dTHX; #endif @@ -1171,8 +1171,8 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) # ifdef MULTIPLICITY sv_catpv(PL_Sv," MULTIPLICITY"); # endif -# ifdef USE_THREADS - sv_catpv(PL_Sv," USE_THREADS"); +# ifdef USE_5005THREADS + sv_catpv(PL_Sv," USE_5005THREADS"); # endif # ifdef USE_ITHREADS sv_catpv(PL_Sv," USE_ITHREADS"); @@ -1373,14 +1373,14 @@ print \" \\@INC:\\n @INC\\n\";"); PL_comppad_name_fill = 0; PL_min_intro_pending = 0; PL_padix = 0; -#ifdef USE_THREADS +#ifdef USE_5005THREADS av_store(PL_comppad_name, 0, newSVpvn("@_", 2)); PL_curpad[0] = (SV*)newAV(); SvPADMY_on(PL_curpad[0]); /* XXX Needed? */ CvOWNER(PL_compcv) = 0; New(666, CvMUTEXP(PL_compcv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(PL_compcv)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ comppadlist = newAV(); AvREAL_off(comppadlist); @@ -1490,7 +1490,7 @@ perl_run(pTHXx) I32 oldscope; int ret = 0; dJMPENV; -#ifdef USE_THREADS +#ifdef USE_5005THREADS dTHX; #endif @@ -1610,13 +1610,13 @@ SV* Perl_get_sv(pTHX_ const char *name, I32 create) { GV *gv; -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (name[1] == '\0' && !isALPHA(name[0])) { PADOFFSET tmp = find_threadsv(name); if (tmp != NOT_IN_PAD) return THREADSV(tmp); } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ gv = gv_fetchpv(name, create, SVt_PV); if (gv) return GvSV(gv); @@ -2596,19 +2596,19 @@ S_init_interp(pTHX) # define PERLVAR(var,type) # define PERLVARA(var,n,type) # if defined(PERL_IMPLICIT_CONTEXT) -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) # define PERLVARI(var,type,init) PERL_GET_INTERP->var = init; # define PERLVARIC(var,type,init) PERL_GET_INTERP->var = init; -# else /* !USE_THREADS */ +# else /* !USE_5005THREADS */ # define PERLVARI(var,type,init) aTHX->var = init; # define PERLVARIC(var,type,init) aTHX->var = init; -# endif /* USE_THREADS */ +# endif /* USE_5005THREADS */ # else # define PERLVARI(var,type,init) PERL_GET_INTERP->var = init; # define PERLVARIC(var,type,init) PERL_GET_INTERP->var = init; # endif # include "intrpvar.h" -# ifndef USE_THREADS +# ifndef USE_5005THREADS # include "thrdvar.h" # endif # undef PERLVAR @@ -2621,7 +2621,7 @@ S_init_interp(pTHX) # define PERLVARI(var,type,init) PL_##var = init; # define PERLVARIC(var,type,init) PL_##var = init; # include "intrpvar.h" -# ifndef USE_THREADS +# ifndef USE_5005THREADS # include "thrdvar.h" # endif # undef PERLVAR @@ -2642,7 +2642,7 @@ S_init_main_stash(pTHX) about not iterating on it, and not adding tie magic to it. It is properly deallocated in perl_destruct() */ PL_strtab = newHV(); -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_INIT(&PL_strtab_mutex); #endif HvSHAREKEYS_off(PL_strtab); /* mandatory */ @@ -3787,7 +3787,7 @@ S_incpush(pTHX_ char *p, int addsubdirs, int addoldvers) } } -#ifdef USE_THREADS +#ifdef USE_5005THREADS STATIC struct perl_thread * S_init_main_thread(pTHX) { @@ -3865,7 +3865,7 @@ S_init_main_thread(pTHX) return thr; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ void Perl_call_list(pTHX_ I32 oldscope, AV *paramList) @@ -34,8 +34,8 @@ /* XXX This next guard can disappear if the sources are revised to use USE_5005THREADS throughout. -- A.D 1/6/2000 */ -#if defined(USE_ITHREADS) && defined(USE_THREADS) -# include "error: USE_ITHREADS and USE_THREADS are incompatible" +#if defined(USE_ITHREADS) && defined(USE_5005THREADS) +# include "error: USE_ITHREADS and USE_5005THREADS are incompatible" #endif /* See L<perlguts/"The Perl API"> for detailed notes on @@ -47,7 +47,7 @@ # endif #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS # ifndef PERL_IMPLICIT_CONTEXT # define PERL_IMPLICIT_CONTEXT # endif @@ -179,7 +179,7 @@ class CPerlObj; #else /* !PERL_OBJECT */ #ifdef PERL_IMPLICIT_CONTEXT -# ifdef USE_THREADS +# ifdef USE_5005THREADS struct perl_thread; # define pTHX register struct perl_thread *thr # define aTHX thr @@ -447,7 +447,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); /* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that pthread.h must be included before all other header files. */ -#if (defined(USE_THREADS) || defined(USE_ITHREADS)) \ +#if (defined(USE_5005THREADS) || defined(USE_ITHREADS)) \ && defined(PTHREAD_H_FIRST) && defined(I_PTHREAD) # include <pthread.h> #endif @@ -765,16 +765,16 @@ typedef struct perl_mstats perl_mstats_t; # define INCLUDE_PROTOTYPES /* for <socks.h> */ # define PERL_SOCKS_NEED_PROTOTYPES # endif -# ifdef USE_THREADS +# ifdef USE_5005THREADS # define PERL_USE_THREADS /* store our value */ -# undef USE_THREADS +# undef USE_5005THREADS # endif # include <socks.h> -# ifdef USE_THREADS -# undef USE_THREADS /* socks.h does this on its own */ +# ifdef USE_5005THREADS +# undef USE_5005THREADS /* socks.h does this on its own */ # endif # ifdef PERL_USE_THREADS -# define USE_THREADS /* restore our value */ +# define USE_5005THREADS /* restore our value */ # undef PERL_USE_THREADS # endif # ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */ @@ -815,7 +815,7 @@ int sockatmark(int); # define SETERRNO(errcode,vmserrcode) (errno = (errcode)) #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS # define ERRSV (thr->errsv) # define DEFSV THREADSV(0) # define SAVE_DEFSV save_threadsv(0) @@ -823,7 +823,7 @@ int sockatmark(int); # define ERRSV GvSV(PL_errgv) # define DEFSV GvSV(PL_defgv) # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define ERRHV GvHV(PL_errgv) /* XXX unused, here for compatibility */ @@ -1956,14 +1956,14 @@ typedef struct ptr_tbl PTR_TBL_t; #endif /* - * USE_THREADS needs to be after unixish.h as <pthread.h> includes + * USE_5005THREADS needs to be after unixish.h as <pthread.h> includes * <sys/signal.h> which defines NSIG - which will stop inclusion of <signal.h> * this results in many functions being undeclared which bothers C++ * May make sense to have threads after "*ish.h" anyway */ -#if defined(USE_THREADS) || defined(USE_ITHREADS) -# if defined(USE_THREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +# if defined(USE_5005THREADS) /* pending resolution of licensing issues, we avoid the erstwhile * atomic.h everywhere */ # define EMULATE_ATOMIC_REFCOUNTS @@ -2002,7 +2002,7 @@ typedef pthread_key_t perl_key; # endif /* WIN32 */ # endif /* FAKE_THREADS */ #endif /* NETWARE */ -#endif /* USE_THREADS || USE_ITHREADS */ +#endif /* USE_5005THREADS || USE_ITHREADS */ #ifdef WIN32 # include "win32.h" @@ -2106,7 +2106,7 @@ typedef pthread_key_t perl_key; #endif #if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_GET_THX) -# ifdef USE_THREADS +# ifdef USE_5005THREADS # define PERL_GET_THX ((struct perl_thread *)PERL_GET_CONTEXT) # else # ifdef MULTIPLICITY @@ -2189,11 +2189,11 @@ union any { }; #endif -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define ARGSproto struct perl_thread *thr #else #define ARGSproto -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ typedef I32 (*filter_t) (pTHXo_ int, SV *, int); @@ -2488,7 +2488,7 @@ Gid_t getegid (void); # define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a) # define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a) -# ifdef USE_THREADS +# ifdef USE_5005THREADS # define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a) # else # define DEBUG_S(a) @@ -3151,7 +3151,7 @@ enum { /* pass one of these to get_vtbl */ want_vtbl_collxfrm, want_vtbl_amagic, want_vtbl_amagicelem, -#ifdef USE_THREADS +#ifdef USE_5005THREADS want_vtbl_mutex, #endif want_vtbl_regdata, @@ -3252,7 +3252,7 @@ struct perl_vars *PL_VarsPtr; */ struct interpreter { -# ifndef USE_THREADS +# ifndef USE_5005THREADS # include "thrdvar.h" # endif # include "intrpvar.h" @@ -3269,7 +3269,7 @@ struct interpreter { }; #endif /* MULTIPLICITY || PERL_OBJECT */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS /* If we have threads define a struct with all the variables * that have to be per-thread */ @@ -3346,7 +3346,7 @@ typedef void *Thread; #if !defined(MULTIPLICITY) && !defined(PERL_OBJECT) START_EXTERN_C # include "intrpvar.h" -# ifndef USE_THREADS +# ifndef USE_5005THREADS # include "thrdvar.h" # endif END_EXTERN_C @@ -3447,9 +3447,9 @@ EXT MGVTBL PL_vtbl_fm = {0, MEMBER_TO_FPTR(Perl_magic_setfm), EXT MGVTBL PL_vtbl_uvar = {MEMBER_TO_FPTR(Perl_magic_getuvar), MEMBER_TO_FPTR(Perl_magic_setuvar), 0, 0, 0}; -#ifdef USE_THREADS +#ifdef USE_5005THREADS EXT MGVTBL PL_vtbl_mutex = {0, 0, 0, 0, MEMBER_TO_FPTR(Perl_magic_mutexfree)}; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ EXT MGVTBL PL_vtbl_defelem = {MEMBER_TO_FPTR(Perl_magic_getdefelem),MEMBER_TO_FPTR(Perl_magic_setdefelem), 0, 0, 0}; @@ -3500,9 +3500,9 @@ EXT MGVTBL PL_vtbl_fm; EXT MGVTBL PL_vtbl_uvar; EXT MGVTBL PL_vtbl_ovrld; -#ifdef USE_THREADS +#ifdef USE_5005THREADS EXT MGVTBL PL_vtbl_mutex; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ EXT MGVTBL PL_vtbl_defelem; EXT MGVTBL PL_vtbl_regexp; @@ -296,7 +296,7 @@ Perl_my_chsize(pTHXo_ int fd, Off_t length) return ((CPerlObj*)pPerl)->Perl_my_chsize(fd, length); } #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_condpair_magic MAGIC* @@ -750,7 +750,7 @@ Perl_fbm_instr(pTHXo_ unsigned char* big, unsigned char* bigend, SV* littlesv, U { return ((CPerlObj*)pPerl)->Perl_fbm_instr(big, bigend, littlesv, flags); } -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #endif #undef Perl_form @@ -1519,7 +1519,7 @@ Perl_grok_numeric_radix(pTHXo_ const char **sp, const char *send) { return ((CPerlObj*)pPerl)->Perl_grok_numeric_radix(sp, send); } -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #endif #if defined(USE_LOCALE_COLLATE) #endif @@ -2223,7 +2223,7 @@ Perl_parse(pTHXo_ XSINIT_t xsinit, int argc, char** argv, char** env) return ((CPerlObj*)pPerl)->Perl_parse(xsinit, argc, argv, env); } #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_new_struct_thread struct perl_thread* @@ -3457,7 +3457,7 @@ Perl_unlnk(pTHXo_ char* f) return ((CPerlObj*)pPerl)->Perl_unlnk(f); } #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_unlock_condpair void @@ -3719,7 +3719,7 @@ Perl_runops_debug(pTHXo) { return ((CPerlObj*)pPerl)->Perl_runops_debug(); } -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) #undef Perl_sv_lock SV* @@ -4237,7 +4237,7 @@ Perl_sys_intern_init(pTHXo) # endif #if defined(PERL_FLEXIBLE_EXCEPTIONS) #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) # endif #endif #if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT) diff --git a/perlvars.h b/perlvars.h index bd07adc59f..ff56195e3a 100644 --- a/perlvars.h +++ b/perlvars.h @@ -18,7 +18,7 @@ PERLVAR(Gcurinterp, PerlInterpreter *) /* currently running interpreter * (initial parent interpreter under * useithreads) */ -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */ #endif @@ -31,7 +31,7 @@ PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}") /* XXX does anyone even use this? */ PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */ -#if defined(MYMALLOC) && (defined(USE_THREADS) || defined(USE_ITHREADS)) +#if defined(MYMALLOC) && (defined(USE_5005THREADS) || defined(USE_ITHREADS)) PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */ #endif diff --git a/pod/perlguts.pod b/pod/perlguts.pod index f89d0a4658..822446e829 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1733,9 +1733,9 @@ the C++ object will contain all the context, the state of that interpreter. Three macros control the major Perl build flavors: MULTIPLICITY, -USE_THREADS and PERL_OBJECT. The MULTIPLICITY build has a C structure +USE_5005THREADS and PERL_OBJECT. The MULTIPLICITY build has a C structure that packages all the interpreter state, there is a similar thread-specific -data structure under USE_THREADS, and the (now deprecated) PERL_OBJECT +data structure under USE_5005THREADS, and the (now deprecated) PERL_OBJECT build has a C++ class to maintain interpreter state. In all three cases, PERL_IMPLICIT_CONTEXT is also normally defined, and enables the support for passing in a "hidden" first argument that represents all three @@ -1819,7 +1819,7 @@ Under PERL_OBJECT in the core, that will translate to either: # see objXSUB.h Under PERL_OBJECT in extensions (aka PERL_CAPI), or under -MULTIPLICITY/USE_THREADS with PERL_IMPLICIT_CONTEXT in both core +MULTIPLICITY/USE_5005THREADS with PERL_IMPLICIT_CONTEXT in both core and extensions, it will become: Perl_sv_setsv(aTHX_ foo, bar); # the canonical Perl "API" @@ -1984,7 +1984,7 @@ that the interpreter knows about itself and pass it around, so too are there plans to allow the interpreter to bundle up everything it knows about the environment it's running on. This is enabled with the PERL_IMPLICIT_SYS macro. Currently it only works with PERL_OBJECT -and USE_THREADS on Windows (see inside iperlsys.h). +and USE_5005THREADS on Windows (see inside iperlsys.h). This allows the ability to provide an extra pointer (called the "host" environment) for all the system calls. This makes it possible for @@ -4147,11 +4147,11 @@ PP(pp_split) #endif } else if (gimme != G_ARRAY) -#ifdef USE_THREADS +#ifdef USE_5005THREADS ary = (AV*)PL_curpad[0]; #else ary = GvAVn(PL_defgv); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ else ary = Nullav; if (ary && (gimme != G_ARRAY || (pm->op_pmflags & PMf_ONCE))) { @@ -4407,7 +4407,7 @@ PP(pp_split) RETPUSHUNDEF; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS void Perl_unlock_condpair(pTHX_ void *svv) { @@ -4424,16 +4424,16 @@ Perl_unlock_condpair(pTHX_ void *svv) PTR2UV(thr), PTR2UV(svv))); MUTEX_UNLOCK(MgMUTEXP(mg)); } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PP(pp_lock) { dSP; dTOPss; SV *retsv = sv; -#ifdef USE_THREADS +#ifdef USE_5005THREADS sv_lock(sv); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef USE_ITHREADS shared_sv *ssv = Perl_sharedsv_find(aTHX_ sv); if(ssv) @@ -4449,7 +4449,7 @@ PP(pp_lock) PP(pp_threadsv) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS dSP; EXTEND(SP, 1); if (PL_op->op_private & OPpLVAL_INTRO) @@ -4459,5 +4459,5 @@ PP(pp_threadsv) RETURN; #else DIE(aTHX_ "tried to access per-thread data in non-threaded perl"); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ } @@ -7,13 +7,13 @@ * */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define ARGS thr #define dARGS struct perl_thread *thr; #else #define ARGS #define dARGS -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define PP(s) OP * Perl_##s(pTHX) @@ -90,7 +90,7 @@ PP(pp_regcomp) tmpstr = POPs; /* prevent recompiling under /o and ithreads. */ -#if defined(USE_ITHREADS) || defined(USE_THREADS) +#if defined(USE_ITHREADS) || defined(USE_5005THREADS) if (pm->op_pmflags & PMf_KEEP && PM_GETRE(pm)) RETURN; #endif @@ -155,7 +155,7 @@ PP(pp_regcomp) /* XXX runtime compiled output needs to move to the pad */ if (pm->op_pmflags & PMf_KEEP) { pm->op_private &= ~OPpRUNTIME; /* no point compiling again */ -#if !defined(USE_ITHREADS) && !defined(USE_THREADS) +#if !defined(USE_ITHREADS) && !defined(USE_5005THREADS) /* XXX can't change the optree at runtime either */ cLOGOP->op_first->op_next = PL_op->op_next; #endif @@ -780,7 +780,7 @@ PP(pp_grepstart) ENTER; /* enter outer scope */ SAVETMPS; - /* SAVE_DEFSV does *not* suffice here for USE_THREADS */ + /* SAVE_DEFSV does *not* suffice here for USE_5005THREADS */ SAVESPTR(DEFSV); ENTER; /* enter inner scope */ SAVEVPTR(PL_curpm); @@ -994,7 +994,7 @@ PP(pp_sort) PL_secondgv = gv_fetchpv("b", TRUE, SVt_PV); PL_sortstash = stash; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS sv_lock((SV *)PL_firstgv); sv_lock((SV *)PL_secondgv); #endif @@ -1016,10 +1016,10 @@ PP(pp_sort) /* This is mostly copied from pp_entersub */ AV *av = (AV*)PL_curpad[0]; -#ifndef USE_THREADS +#ifndef USE_5005THREADS cx->blk_sub.savearray = GvAV(PL_defgv); GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cx->blk_sub.oldcurpad = PL_curpad; cx->blk_sub.argarray = av; } @@ -1770,14 +1770,14 @@ PP(pp_enteriter) ENTER; SAVETMPS; -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (PL_op->op_flags & OPf_SPECIAL) { svp = &THREADSV(PL_op->op_targ); /* per-thread variable */ SAVEGENERICSV(*svp); *svp = NEWSV(0,0); } else -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (PL_op->op_targ) { #ifndef USE_ITHREADS svp = &PL_curpad[PL_op->op_targ]; /* "my" variable */ @@ -2252,10 +2252,10 @@ PP(pp_goto) EXTEND(PL_stack_sp, items); /* @_ could have been extended. */ Copy(AvARRAY(av), PL_stack_sp, items, SV*); PL_stack_sp += items; -#ifndef USE_THREADS +#ifndef USE_5005THREADS SvREFCNT_dec(GvAV(PL_defgv)); GvAV(PL_defgv) = cx->blk_sub.savearray; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* abandon @_ if it got reified */ if (AvREAL(av)) { (void)sv_2mortal((SV*)av); /* delay until return */ @@ -2267,7 +2267,7 @@ PP(pp_goto) } else if (CvXSUB(cv)) { /* put GvAV(defgv) back onto stack */ AV* av; -#ifdef USE_THREADS +#ifdef USE_5005THREADS av = (AV*)PL_curpad[0]; #else av = GvAV(PL_defgv); @@ -2379,7 +2379,7 @@ PP(pp_goto) svp = AvARRAY(padlist); } } -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (!cx->blk_sub.hasargs) { AV* av = (AV*)PL_curpad[0]; @@ -2392,20 +2392,20 @@ PP(pp_goto) PUTBACK ; } } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ SAVEVPTR(PL_curpad); PL_curpad = AvARRAY((AV*)svp[CvDEPTH(cv)]); -#ifndef USE_THREADS +#ifndef USE_5005THREADS if (cx->blk_sub.hasargs) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ { AV* av = (AV*)PL_curpad[0]; SV** ary; -#ifndef USE_THREADS +#ifndef USE_5005THREADS cx->blk_sub.savearray = GvAV(PL_defgv); GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cx->blk_sub.oldcurpad = PL_curpad; cx->blk_sub.argarray = av; ++mark; @@ -2805,7 +2805,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, char *code, AV** avp) return rop; } -/* With USE_THREADS, eval_owner must be held on entry to doeval */ +/* With USE_5005THREADS, eval_owner must be held on entry to doeval */ STATIC OP * S_doeval(pTHX_ int gimme, OP** startop) { @@ -2849,11 +2849,11 @@ S_doeval(pTHX_ int gimme, OP** startop) assert(CxTYPE(&cxstack[cxstack_ix]) == CXt_EVAL); cxstack[cxstack_ix].blk_eval.cv = PL_compcv; -#ifdef USE_THREADS +#ifdef USE_5005THREADS CvOWNER(PL_compcv) = 0; New(666, CvMUTEXP(PL_compcv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(PL_compcv)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PL_comppad = newAV(); av_push(PL_comppad, Nullsv); @@ -2862,11 +2862,11 @@ S_doeval(pTHX_ int gimme, OP** startop) PL_comppad_name_fill = 0; PL_min_intro_pending = 0; PL_padix = 0; -#ifdef USE_THREADS +#ifdef USE_5005THREADS av_store(PL_comppad_name, 0, newSVpvn("@_", 2)); PL_curpad[0] = (SV*)newAV(); SvPADMY_on(PL_curpad[0]); /* XXX Needed? */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ comppadlist = newAV(); AvREAL_off(comppadlist); @@ -2940,12 +2940,12 @@ S_doeval(pTHX_ int gimme, OP** startop) } SvREFCNT_dec(PL_rs); PL_rs = SvREFCNT_inc(PL_nrs); -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_LOCK(&PL_eval_mutex); PL_eval_owner = 0; COND_SIGNAL(&PL_eval_cond); MUTEX_UNLOCK(&PL_eval_mutex); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ RETPUSHUNDEF; } SvREFCNT_dec(PL_rs); @@ -2984,12 +2984,12 @@ S_doeval(pTHX_ int gimme, OP** startop) SP = PL_stack_base + POPMARK; /* pop original mark */ PL_op = saveop; /* The caller may need it. */ PL_lex_state = LEX_NOTPARSING; /* $^S needs this. */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_LOCK(&PL_eval_mutex); PL_eval_owner = 0; COND_SIGNAL(&PL_eval_cond); MUTEX_UNLOCK(&PL_eval_mutex); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ RETURNOP(PL_eval_start); } @@ -3368,14 +3368,14 @@ trylocal: { CopLINE_set(&PL_compiling, 0); PUTBACK; -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_LOCK(&PL_eval_mutex); if (PL_eval_owner && PL_eval_owner != thr) while (PL_eval_owner) COND_WAIT(&PL_eval_cond, &PL_eval_mutex); PL_eval_owner = thr; MUTEX_UNLOCK(&PL_eval_mutex); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ return DOCATCH(doeval(gimme, NULL)); } @@ -3452,14 +3452,14 @@ PP(pp_entereval) if (PERLDB_LINE && PL_curstash != PL_debstash) save_lines(CopFILEAV(&PL_compiling), PL_linestr); PUTBACK; -#ifdef USE_THREADS +#ifdef USE_5005THREADS MUTEX_LOCK(&PL_eval_mutex); if (PL_eval_owner && PL_eval_owner != thr) while (PL_eval_owner) COND_WAIT(&PL_eval_cond, &PL_eval_mutex); PL_eval_owner = thr; MUTEX_UNLOCK(&PL_eval_mutex); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ ret = doeval(gimme, NULL); if (PERLDB_INTER && was != PL_sub_generation /* Some subs defined here. */ && ret != PL_op->op_next) { /* Successive compilation. */ @@ -4203,7 +4203,7 @@ sortcv_stacked(pTHXo_ SV *a, SV *b) I32 result; AV *av; -#ifdef USE_THREADS +#ifdef USE_5005THREADS av = (AV*)PL_curpad[0]; #else av = GvAV(PL_defgv); @@ -21,9 +21,9 @@ /* Hot code. */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS static void unset_cvowner(pTHXo_ void *cvarg); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PP(pp_const) { @@ -1790,7 +1790,7 @@ PP(pp_iter) STRLEN maxlen; char *max = SvPV((SV*)av, maxlen); if (!SvNIOK(cur) && SvCUR(cur) <= maxlen) { -#ifndef USE_THREADS /* don't risk potential race */ +#ifndef USE_5005THREADS /* don't risk potential race */ if (SvREFCNT(*itersvp) == 1 && !SvMAGICAL(*itersvp)) { /* safe to reuse old SV */ sv_setsv(*itersvp, cur); @@ -1816,7 +1816,7 @@ PP(pp_iter) if (cx->blk_loop.iterix > cx->blk_loop.itermax) RETPUSHNO; -#ifndef USE_THREADS /* don't risk potential race */ +#ifndef USE_5005THREADS /* don't risk potential race */ if (SvREFCNT(*itersvp) == 1 && !SvMAGICAL(*itersvp)) { /* safe to reuse old SV */ sv_setiv(*itersvp, cx->blk_loop.iterix++); @@ -2547,7 +2547,7 @@ try_autoload: DIE(aTHX_ "No DBsub routine"); } -#ifdef USE_THREADS +#ifdef USE_5005THREADS /* * First we need to check if the sub or method requires locking. * If so, we gain a lock on the CV, the first argument or the @@ -2679,7 +2679,7 @@ try_autoload: SAVEDESTRUCTOR_X(unset_cvowner, (void*) cv); } } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (CvXSUB(cv)) { #ifdef PERL_XSUB_OLDSTYLE @@ -2712,11 +2712,11 @@ try_autoload: * back. This would allow popping @_ in XSUB, e.g.. XXXX */ AV* av; I32 items; -#ifdef USE_THREADS +#ifdef USE_5005THREADS av = (AV*)PL_curpad[0]; #else av = GvAV(PL_defgv); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ items = AvFILLp(av) + 1; /* @_ is not tieable */ if (items) { @@ -2808,7 +2808,7 @@ try_autoload: svp = AvARRAY(padlist); } } -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (!hasargs) { AV* av = (AV*)PL_curpad[0]; @@ -2821,12 +2821,12 @@ try_autoload: PUTBACK ; } } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ SAVEVPTR(PL_curpad); PL_curpad = AvARRAY((AV*)svp[CvDEPTH(cv)]); -#ifndef USE_THREADS +#ifndef USE_5005THREADS if (hasargs) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ { AV* av; SV** ary; @@ -2843,10 +2843,10 @@ try_autoload: AvREAL_off(av); AvREIFY_on(av); } -#ifndef USE_THREADS +#ifndef USE_5005THREADS cx->blk_sub.savearray = GvAV(PL_defgv); GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cx->blk_sub.oldcurpad = PL_curpad; cx->blk_sub.argarray = av; ++MARK; @@ -3129,7 +3129,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp) return isGV(gv) ? (SV*)GvCV(gv) : (SV*)gv; } -#ifdef USE_THREADS +#ifdef USE_5005THREADS static void unset_cvowner(pTHXo_ void *cvarg) { @@ -3146,4 +3146,4 @@ unset_cvowner(pTHXo_ void *cvarg) MUTEX_UNLOCK(CvMUTEXP(cv)); SvREFCNT_dec(cv); } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ @@ -101,7 +101,7 @@ PERL_CALLCONV UV Perl_cast_uv(pTHX_ NV f); #if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP) PERL_CALLCONV I32 Perl_my_chsize(pTHX_ int fd, Off_t length); #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV MAGIC* Perl_condpair_magic(pTHX_ SV *sv); #endif PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o); @@ -271,7 +271,7 @@ PERL_CALLCONV void Perl_dump_sub(pTHX_ GV* gv); PERL_CALLCONV void Perl_fbm_compile(pTHX_ SV* sv, U32 flags); PERL_CALLCONV char* Perl_fbm_instr(pTHX_ unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags); PERL_CALLCONV char* Perl_find_script(pTHX_ char *scriptname, bool dosearch, char **search_ext, I32 flags); -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV PADOFFSET Perl_find_threadsv(pTHX_ const char *name); #endif PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg); @@ -428,7 +428,7 @@ PERL_CALLCONV int Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg); PERL_CALLCONV int Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg); PERL_CALLCONV int Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg); PERL_CALLCONV U32 Perl_magic_len(pTHX_ SV* sv, MAGIC* mg); -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV int Perl_magic_mutexfree(pTHX_ SV* sv, MAGIC* mg); #endif PERL_CALLCONV int Perl_magic_nextpack(pTHX_ SV* sv, MAGIC* mg, SV* key); @@ -601,7 +601,7 @@ PERL_CALLCONV void Perl_free(pTHX); PERL_CALLCONV int Perl_run(pTHX); PERL_CALLCONV int Perl_parse(pTHX_ XSINIT_t xsinit, int argc, char** argv, char** env); #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV struct perl_thread* Perl_new_struct_thread(pTHX_ struct perl_thread *t); #endif PERL_CALLCONV void Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr); @@ -826,7 +826,7 @@ PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ U8 *p); #if defined(UNLINK_ALL_VERSIONS) PERL_CALLCONV I32 Perl_unlnk(pTHX_ char* f); #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV void Perl_unlock_condpair(pTHX_ void* svv); #endif PERL_CALLCONV void Perl_unsharepvn(pTHX_ const char* sv, I32 len, U32 hash); @@ -891,7 +891,7 @@ PERL_CALLCONV struct perl_vars * Perl_GetVars(pTHX); #endif PERL_CALLCONV int Perl_runops_standard(pTHX); PERL_CALLCONV int Perl_runops_debug(pTHX); -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) PERL_CALLCONV SV* Perl_sv_lock(pTHX_ SV *sv); #endif PERL_CALLCONV void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...) @@ -1085,7 +1085,7 @@ STATIC void* S_vrun_body(pTHX_ va_list args); STATIC void* S_vcall_body(pTHX_ va_list args); STATIC void* S_vcall_list_body(pTHX_ va_list args); #endif -# if defined(USE_THREADS) +# if defined(USE_5005THREADS) STATIC struct perl_thread * S_init_main_thread(pTHX); # endif #endif @@ -1841,7 +1841,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) if (PL_reg_sv) { /* Make $_ available to executed code. */ if (PL_reg_sv != DEFSV) { - /* SAVE_DEFSV does *not* suffice here for USE_THREADS */ + /* SAVE_DEFSV does *not* suffice here for USE_5005THREADS */ SAVESPTR(DEFSV); DEFSV = PL_reg_sv; } @@ -50,7 +50,7 @@ Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt, SV** Perl_stack_grow(pTHX_ SV **sp, SV **p, int n) { -#if defined(DEBUGGING) && !defined(USE_THREADS) +#if defined(DEBUGGING) && !defined(USE_5005THREADS) static int growing = 0; if (growing++) abort(); @@ -61,7 +61,7 @@ Perl_stack_grow(pTHX_ SV **sp, SV **p, int n) #else av_extend(PL_curstack, (p - PL_stack_base) + (n) + 1); #endif -#if defined(DEBUGGING) && !defined(USE_THREADS) +#if defined(DEBUGGING) && !defined(USE_5005THREADS) growing--; #endif return PL_stack_sp; @@ -458,7 +458,7 @@ Perl_save_padsv(pTHX_ PADOFFSET off) SV ** Perl_save_threadsv(pTHX_ PADOFFSET i) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS SV **svp = &THREADSV(i); /* XXX Change to save by offset */ DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n", (UV)i, svp, *svp, SvPEEK(*svp))); @@ -467,7 +467,7 @@ Perl_save_threadsv(pTHX_ PADOFFSET i) #else Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl"); return 0; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ } void @@ -4500,11 +4500,11 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam case PERL_MAGIC_dbline: mg->mg_virtual = &PL_vtbl_dbline; break; -#ifdef USE_THREADS +#ifdef USE_5005THREADS case PERL_MAGIC_mutex: mg->mg_virtual = &PL_vtbl_mutex; break; -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef USE_LOCALE_COLLATE case PERL_MAGIC_collxfrm: mg->mg_virtual = &PL_vtbl_collxfrm; @@ -8318,8 +8318,8 @@ ptr_table_* functions. #if defined(USE_ITHREADS) -#if defined(USE_THREADS) -# include "error: USE_THREADS and USE_ITHREADS are incompatible" +#if defined(USE_5005THREADS) +# include "error: USE_5005THREADS and USE_ITHREADS are incompatible" #endif #ifndef GpREFCNT_inc @@ -121,7 +121,7 @@ perform the upgrade if necessary. See C<svtype>. #define SvFLAGS(sv) (sv)->sv_flags #define SvREFCNT(sv) (sv)->sv_refcnt -#ifdef USE_THREADS +#ifdef USE_5005THREADS # if defined(VMS) # define ATOMIC_INC(count) __ATOMIC_INCREMENT_LONG(&count) @@ -146,7 +146,7 @@ perform the upgrade if necessary. See C<svtype>. #else # define ATOMIC_INC(count) (++count) # define ATOMIC_DEC_AND_TEST(res, count) (res = (--count == 0)) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef __GNUC__ # define SvREFCNT_inc(sv) \ @@ -157,7 +157,7 @@ perform the upgrade if necessary. See C<svtype>. nsv; \ }) #else -# if defined(CRIPPLED_CC) || defined(USE_THREADS) +# if defined(CRIPPLED_CC) || defined(USE_5005THREADS) # if defined(VMS) && defined(__ALPHA) # define SvREFCNT_inc(sv) \ (PL_Sv=(SV*)(sv), (PL_Sv && __ATOMIC_INCREMENT_LONG(&(SvREFCNT(PL_Sv)))), (SV *)PL_Sv) @@ -345,10 +345,10 @@ struct xpvfm { long xcv_depth; /* >= 2 indicates recursive call */ AV * xcv_padlist; CV * xcv_outside; -#ifdef USE_THREADS +#ifdef USE_5005THREADS perl_mutex *xcv_mutexp; /* protects xcv_owner */ struct perl_thread *xcv_owner; /* current owner thread */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ cv_flags_t xcv_flags; I32 xfm_lines; @@ -1084,7 +1084,7 @@ otherwise. : sv_2bool(sv) ) # define SvTRUEx(sv) ({SV *nsv = (sv); SvTRUE(nsv); }) #else /* __GNUC__ */ -#ifndef USE_THREADS +#ifndef USE_5005THREADS /* These inlined macros use globals, which will require a thread * declaration in user code, so we avoid them under threads */ @@ -1118,7 +1118,7 @@ otherwise. ? SvNVX(sv) != 0.0 \ : sv_2bool(sv) ) # define SvTRUEx(sv) ((PL_Sv = (sv)), SvTRUE(PL_Sv)) -#endif /* !USE_THREADS */ +#endif /* !USE_5005THREADS */ #endif /* !__GNU__ */ #endif /* !CRIPPLED_CC */ @@ -5,16 +5,16 @@ /* Don't forget to re-run embed.pl to propagate changes! */ /* The 'T' prefix is only needed for vars that need appropriate #defines - * generated when built with or without USE_THREADS. It is also used + * generated when built with or without USE_5005THREADS. It is also used * to generate the appropriate export list for win32. * - * When building without USE_THREADS, these variables will be truly global. - * When building without USE_THREADS but with MULTIPLICITY, these variables + * When building without USE_5005THREADS, these variables will be truly global. + * When building without USE_5005THREADS but with MULTIPLICITY, these variables * will be global per-interpreter. */ /* Important ones in the first cache line (if alignment is done right) */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS PERLVAR(interp, PerlInterpreter*) /* thread owner */ #endif @@ -233,7 +233,7 @@ PERLVAR(Twatchok, char *) /* Note that the variables below are all explicitly referenced in the code * as thr->whatever and therefore don't need the 'T' prefix. */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS PERLVAR(oursv, SV *) PERLVAR(cvcache, HV *) @@ -257,7 +257,7 @@ PERLVAR(i, struct thread_intern) PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */ PERLVAR(thr_done, bool) /* True when the thread has finished */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PERLVAR(Treg_sv_utf8, bool) /* was what we matched against utf8 */ @@ -1,4 +1,4 @@ -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) #if defined(VMS) #include <builtins.h> @@ -317,7 +317,7 @@ # define THREAD_RET_CAST(p) ((void *)(p)) #endif /* THREAD_RET */ -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) /* Accessor for per-thread SVs */ # define THREADSV(i) (thr->threadsvp[i]) @@ -371,8 +371,8 @@ typedef struct condpair { #define MgCONDP(mg) (&((condpair_t *)(mg->mg_ptr))->cond) #define MgOWNER(mg) ((condpair_t *)(mg->mg_ptr))->owner -#endif /* USE_THREADS */ -#endif /* USE_THREADS || USE_ITHREADS */ +#endif /* USE_5005THREADS */ +#endif /* USE_5005THREADS || USE_ITHREADS */ #ifndef MUTEX_LOCK # define MUTEX_LOCK(m) @@ -2285,13 +2285,13 @@ Perl_yylex(pTHX) if (PL_lex_dojoin) { PL_nextval[PL_nexttoke].ival = 0; force_next(','); -#ifdef USE_THREADS +#ifdef USE_5005THREADS PL_nextval[PL_nexttoke].opval = newOP(OP_THREADSV, 0); PL_nextval[PL_nexttoke].opval->op_targ = find_threadsv("\""); force_next(PRIVATEREF); #else force_ident("\"", '$'); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ PL_nextval[PL_nexttoke].ival = 0; force_next('$'); PL_nextval[PL_nexttoke].ival = 0; @@ -5164,7 +5164,7 @@ S_pending_ident(pTHX) */ if (!strchr(PL_tokenbuf,':')) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS /* Check for single character per-thread SVs */ if (PL_tokenbuf[0] == '$' && PL_tokenbuf[2] == '\0' && !isALPHA(PL_tokenbuf[1]) /* Rule out obvious non-threadsvs */ @@ -5174,7 +5174,7 @@ S_pending_ident(pTHX) yylval.opval->op_targ = tmp; return PRIVATEREF; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if ((tmp = pad_findmy(PL_tokenbuf)) != NOT_IN_PAD) { SV *namesv = AvARRAY(PL_comppad_name)[tmp]; /* might be an "our" variable" */ @@ -7455,11 +7455,11 @@ Perl_start_subparse(pTHX_ I32 is_format, U32 flags) PL_min_intro_pending = 0; PL_padix = 0; PL_subline = CopLINE(PL_curcop); -#ifdef USE_THREADS +#ifdef USE_5005THREADS av_store(PL_comppad_name, 0, newSVpvn("@_", 2)); PL_curpad[0] = (SV*)newAV(); SvPADMY_on(PL_curpad[0]); /* XXX Needed? */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ comppadlist = newAV(); AvREAL_off(comppadlist); @@ -7468,11 +7468,11 @@ Perl_start_subparse(pTHX_ I32 is_format, U32 flags) CvPADLIST(PL_compcv) = comppadlist; CvOUTSIDE(PL_compcv) = (CV*)SvREFCNT_inc(outsidecv); -#ifdef USE_THREADS +#ifdef USE_5005THREADS CvOWNER(PL_compcv) = 0; New(666, CvMUTEXP(PL_compcv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(PL_compcv)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ return oldsavestack_ix; } @@ -3344,7 +3344,7 @@ /*#define USE_5005THREADS / **/ /*#define USE_ITHREADS / **/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API / **/ /*#define USE_REENTRANT_API / **/ @@ -1054,7 +1054,7 @@ Perl_vmess(pTHX_ const char *pat, va_list *args) line_mode ? "line" : "chunk", (IV)IoLINES(GvIOp(PL_last_in_gv))); } -#ifdef USE_THREADS +#ifdef USE_5005THREADS if (thr->tid) Perl_sv_catpvf(aTHX_ sv, " thread %ld", thr->tid); #endif @@ -1406,9 +1406,9 @@ Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args) message = SvPV(msv, msglen); if (ckDEAD(err)) { -#ifdef USE_THREADS +#ifdef USE_5005THREADS DEBUG_S(PerlIO_printf(Perl_debug_log, "croak: 0x%"UVxf" %s", PTR2UV(thr), message)); -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ if (PL_diehook) { /* sv_2cv might call Perl_croak() */ SV *olddiehook = PL_diehook; @@ -2120,7 +2120,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode) void Perl_atfork_lock(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) /* locks must be held in locking order (if any) */ # ifdef MYMALLOC MUTEX_LOCK(&PL_malloc_mutex); @@ -2133,7 +2133,7 @@ Perl_atfork_lock(void) void Perl_atfork_unlock(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) /* locks must be released in same order as in atfork_lock() */ # ifdef MYMALLOC MUTEX_UNLOCK(&PL_malloc_mutex); @@ -2147,7 +2147,7 @@ Perl_my_fork(void) { #if defined(HAS_FORK) Pid_t pid; -#if (defined(USE_THREADS) || defined(USE_ITHREADS)) && !defined(HAS_PTHREAD_ATFORK) +#if (defined(USE_5005THREADS) || defined(USE_ITHREADS)) && !defined(HAS_PTHREAD_ATFORK) atfork_lock(); pid = fork(); atfork_unlock(); @@ -2790,7 +2790,7 @@ Perl_find_script(pTHX_ char *scriptname, bool dosearch, char **search_ext, I32 f void * Perl_get_context(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef OLD_PTHREADS_API pthread_addr_t t; if (pthread_getspecific(PL_thr_key, &t)) @@ -2811,7 +2811,7 @@ Perl_get_context(void) void Perl_set_context(void *t) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef I_MACH_CTHREADS cthread_set_data(cthread_self(), t); # else @@ -2823,7 +2823,7 @@ Perl_set_context(void *t) #endif /* !PERL_GET_CONTEXT_DEFINED */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS #ifdef FAKE_THREADS /* Very simplistic scheduler for now */ @@ -3096,7 +3096,7 @@ Perl_new_struct_thread(pTHX_ struct perl_thread *t) #endif /* HAVE_THREAD_INTERN */ return thr; } -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #ifdef PERL_GLOBAL_STRUCT struct perl_vars * @@ -3217,7 +3217,7 @@ Perl_get_vtbl(pTHX_ int vtbl_id) case want_vtbl_uvar: result = &PL_vtbl_uvar; break; -#ifdef USE_THREADS +#ifdef USE_5005THREADS case want_vtbl_mutex: result = &PL_vtbl_mutex; break; diff --git a/vms/genconfig.pl b/vms/genconfig.pl index ef1d5ad4a5..2794a172a1 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -157,8 +157,8 @@ foreach (@ARGV) { $optimize = $qual; $ccflags =~ s/$qual//; } - $usethreads = ($ccflags =~ m!/DEF[^/]+USE_THREADS!i and - $ccflags !~ m!/UND[^/]+USE_THREADS!i); + $usethreads = ($ccflags =~ m!/DEF[^/]+USE_5005THREADS!i and + $ccflags !~ m!/UND[^/]+USE_5005THREADS!i); print OUT "usethreads='",($usethreads ? 'define' : 'undef'),"'\n";; $optimize = "$debug$optimize"; print OUT "ccflags='$ccflags'\n"; @@ -367,8 +367,8 @@ close IN; # as the manifest for the obsolete variable $d_eunice. print OUT "d_eunice='undef'\n"; delete $pp_vars{VMS}; -# XXX temporary -- USE_THREADS is currently on CC command line -delete $pp_vars{'USE_THREADS'}; +# XXX temporary -- USE_5005THREADS is currently on CC command line +delete $pp_vars{'USE_5005THREADS'}; foreach (sort keys %pp_vars) { warn "Didn't see $_ in $infile\n"; @@ -224,13 +224,13 @@ Perl_vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, /* fully initialized, in which case either thr or PL_curcop */ /* might be bogus. We have to check, since ckWARN needs them */ /* both to be valid if running threaded */ -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) if (thr && PL_curcop) { #endif if (ckWARN(WARN_MISC)) { Perl_warner(aTHX_ WARN_MISC,"Value of CLI symbol \"%s\" too long",lnm); } -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) } else { Perl_warner(aTHX_ WARN_MISC,"Value of CLI symbol \"%s\" too long",lnm); } @@ -439,7 +439,7 @@ prime_env_iter(void) #if defined(PERL_IMPLICIT_CONTEXT) pTHX; #endif -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) static perl_mutex primenv_mutex; MUTEX_INIT(&primenv_mutex); #endif @@ -4084,7 +4084,7 @@ vms_image_init(int *argcp, char ***argvp) if (tabidx) { tabvec[tabidx] = NULL; env_tables = tabvec; } getredirection(argcp,argvp); -#if defined(USE_THREADS) && ( defined(__DECC) || defined(__DECCXX) ) +#if defined(USE_5005THREADS) && ( defined(__DECC) || defined(__DECCXX) ) { # include <reentrancy.h> (void) decc$set_reentrancy(C$C_MULTITHREAD); diff --git a/vos/config.alpha.h b/vos/config.alpha.h index 1f114f6e8a..b7e221ac99 100644 --- a/vos/config.alpha.h +++ b/vos/config.alpha.h @@ -3344,7 +3344,7 @@ /*#define USE_5005THREADS /**/ /*#define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/vos/config.ga.h b/vos/config.ga.h index d4ab292947..930420519c 100644 --- a/vos/config.ga.h +++ b/vos/config.ga.h @@ -3344,7 +3344,7 @@ /*#define USE_5005THREADS /**/ /*#define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.bc b/win32/config_H.bc index 57689b1d87..b35e4ac00a 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -3220,7 +3220,7 @@ /*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.gc b/win32/config_H.gc index 0abfa62bf0..f06db24076 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -3220,7 +3220,7 @@ /*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.vc b/win32/config_H.vc index 1834f7a628..deab1204bb 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -3220,7 +3220,7 @@ /*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/perllib.c b/win32/perllib.c index fcf1bec884..2d5a87d141 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -377,7 +377,7 @@ DllMain(HANDLE hModule, /* DLL module handle */ PerlIO_cleanup() was done here but fails (B). */ EndSockets(); -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) if (PL_curinterp) FREE_THREAD_KEY; #endif diff --git a/win32/win32.h b/win32/win32.h index 58c19c36ff..1350670690 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -402,11 +402,11 @@ struct thread_intern { # endif }; -#ifdef USE_THREADS +#ifdef USE_5005THREADS # ifndef USE_DECLSPEC_THREAD # define HAVE_THREAD_INTERN # endif /* !USE_DECLSPEC_THREAD */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define HAVE_INTERP_INTERN typedef struct { @@ -426,7 +426,7 @@ struct interp_intern { child_tab * pseudo_children; #endif void * internal_host; -#ifndef USE_THREADS +#ifndef USE_5005THREADS struct thread_intern thr_intern; #endif }; @@ -446,7 +446,7 @@ struct interp_intern { #define w32_pseudo_child_pids (w32_pseudo_children->pids) #define w32_pseudo_child_handles (w32_pseudo_children->handles) #define w32_internal_host (PL_sys_intern.internal_host) -#ifdef USE_THREADS +#ifdef USE_5005THREADS # define w32_strerror_buffer (thr->i.Wstrerror_buffer) # define w32_getlogin_buffer (thr->i.Wgetlogin_buffer) # define w32_crypt_buffer (thr->i.Wcrypt_buffer) @@ -458,7 +458,7 @@ struct interp_intern { # define w32_crypt_buffer (PL_sys_intern.thr_intern.Wcrypt_buffer) # define w32_servent (PL_sys_intern.thr_intern.Wservent) # define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* UNICODE<>ANSI translation helpers */ /* Use CP_ACP when mode is ANSI */ diff --git a/win32/win32sck.c b/win32/win32sck.c index 3edeefd689..bdc335f4fc 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -40,7 +40,7 @@ # define TO_SOCKET(x) (x) #endif /* USE_SOCKETS_AS_HANDLES */ -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) #define StartSockets() \ STMT_START { \ if (!wsock_started) \ @@ -105,7 +105,7 @@ void set_socktype(void) { #ifdef USE_SOCKETS_AS_HANDLES -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) dTHXo; if (!w32_init_socktype) { #endif @@ -115,7 +115,7 @@ set_socktype(void) */ setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&iSockOpt, sizeof(iSockOpt)); -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) w32_init_socktype = 1; } #endif diff --git a/win32/win32thread.c b/win32/win32thread.c index 900f5fedff..6df2768c77 100644 --- a/win32/win32thread.c +++ b/win32/win32thread.c @@ -14,7 +14,7 @@ __declspec(thread) void *PL_current_context = NULL; void Perl_set_context(void *t) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD Perl_current_context = t; # else @@ -28,7 +28,7 @@ Perl_set_context(void *t) void * Perl_get_context(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD return Perl_current_context; # else @@ -42,7 +42,7 @@ Perl_get_context(void) #endif } -#ifdef USE_THREADS +#ifdef USE_5005THREADS void Perl_init_thread_intern(struct perl_thread *athr) { diff --git a/win32/win32thread.h b/win32/win32thread.h index 7105eca2e5..a86ea61f04 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -154,7 +154,7 @@ extern __declspec(thread) void *PL_current_context; #define PERL_SET_CONTEXT(t) Perl_set_context(t) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) struct perl_thread; int Perl_thread_create (struct perl_thread *thr, thread_func_t *fn); void Perl_set_thread_self (struct perl_thread *thr); @@ -162,7 +162,7 @@ void Perl_init_thread_intern (struct perl_thread *t); #define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ END_EXTERN_C diff --git a/wince/config.h b/wince/config.h index 77e2dded4f..356f77b777 100644 --- a/wince/config.h +++ b/wince/config.h @@ -3220,7 +3220,7 @@ /*#define USE_5005THREADS /**/ /*#define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/wince/config_H.ce b/wince/config_H.ce index 35643b9089..e39045ff11 100644 --- a/wince/config_H.ce +++ b/wince/config_H.ce @@ -2985,7 +2985,7 @@ /*#define USE_5005THREADS /**/ /*#define USE_ITHREADS /**/ #if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ +#define USE_5005THREADS /* until src is revised*/ #endif /*#define OLD_PTHREADS_API /**/ diff --git a/wince/win32.h b/wince/win32.h index 5ffe5dc4e2..a6544c6c93 100644 --- a/wince/win32.h +++ b/wince/win32.h @@ -384,11 +384,11 @@ struct thread_intern { # endif }; -#ifdef USE_THREADS +#ifdef USE_5005THREADS # ifndef USE_DECLSPEC_THREAD # define HAVE_THREAD_INTERN # endif /* !USE_DECLSPEC_THREAD */ -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define HAVE_INTERP_INTERN typedef struct { @@ -408,7 +408,7 @@ struct interp_intern { child_tab * pseudo_children; #endif void * internal_host; -#ifndef USE_THREADS +#ifndef USE_5005THREADS struct thread_intern thr_intern; #endif }; @@ -428,7 +428,7 @@ struct interp_intern { #define w32_pseudo_child_pids (w32_pseudo_children->pids) #define w32_pseudo_child_handles (w32_pseudo_children->handles) #define w32_internal_host (PL_sys_intern.internal_host) -#ifdef USE_THREADS +#ifdef USE_5005THREADS # define w32_strerror_buffer (thr->i.Wstrerror_buffer) # define w32_getlogin_buffer (thr->i.Wgetlogin_buffer) # define w32_crypt_buffer (thr->i.Wcrypt_buffer) @@ -440,7 +440,7 @@ struct interp_intern { # define w32_crypt_buffer (PL_sys_intern.thr_intern.Wcrypt_buffer) # define w32_servent (PL_sys_intern.thr_intern.Wservent) # define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ /* UNICODE<>ANSI translation helpers */ /* Use CP_ACP when mode is ANSI */ diff --git a/wince/win32thread.c b/wince/win32thread.c index 39354474e7..51b33d59eb 100644 --- a/wince/win32thread.c +++ b/wince/win32thread.c @@ -16,7 +16,7 @@ __declspec(thread) void *PL_current_context = NULL; void Perl_set_context(void *t) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD Perl_current_context = t; # else @@ -30,7 +30,7 @@ Perl_set_context(void *t) void * Perl_get_context(void) { -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD return Perl_current_context; # else @@ -44,7 +44,7 @@ Perl_get_context(void) #endif } -#ifdef USE_THREADS +#ifdef USE_5005THREADS void Perl_init_thread_intern(struct perl_thread *athr) { diff --git a/wince/win32thread.h b/wince/win32thread.h index c930bfa342..adae6180e7 100644 --- a/wince/win32thread.h +++ b/wince/win32thread.h @@ -156,7 +156,7 @@ extern __declspec(thread) void *PL_current_context; #define PERL_SET_CONTEXT(t) Perl_set_context(t) #endif -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) struct perl_thread; int Perl_thread_create (struct perl_thread *thr, thread_func_t *fn); void Perl_set_thread_self (struct perl_thread *thr); @@ -164,7 +164,7 @@ void Perl_init_thread_intern (struct perl_thread *t); #define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ END_EXTERN_C diff --git a/wince/wincesck.c b/wince/wincesck.c index 3756ea75f8..64a1cab0c5 100644 --- a/wince/wincesck.c +++ b/wince/wincesck.c @@ -62,7 +62,7 @@ XCE_EXPORT struct protoent *xcegetprotobynumber(int number); #define TO_SOCKET(X) (X) -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define StartSockets() \ STMT_START { \ if (!wsock_started) \ |