diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-17 23:43:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-17 23:43:59 +0000 |
commit | b363f7ed458679f785ff5f459a6ae701688eb6f5 (patch) | |
tree | d1d739a0d522d5a7669690df46c1531ff207ca3e | |
parent | 32e30700cf966bf527dceb0482a205346d2d955f (diff) | |
download | perl-b363f7ed458679f785ff5f459a6ae701688eb6f5.tar.gz |
PL_malloc_mutex needs to be global, not per-interpreter
(malloc.c has static data)
p4raw-id: //depot/perl@4403
-rw-r--r-- | embedvar.h | 5 | ||||
-rw-r--r-- | intrpvar.h | 1 | ||||
-rw-r--r-- | objXSUB.h | 4 | ||||
-rw-r--r-- | perl.c | 15 | ||||
-rw-r--r-- | perlvars.h | 4 |
5 files changed, 21 insertions, 8 deletions
diff --git a/embedvar.h b/embedvar.h index 22a970ac55..b018119e3c 100644 --- a/embedvar.h +++ b/embedvar.h @@ -304,7 +304,6 @@ #define PL_main_cv (PERL_GET_INTERP->Imain_cv) #define PL_main_root (PERL_GET_INTERP->Imain_root) #define PL_main_start (PERL_GET_INTERP->Imain_start) -#define PL_malloc_mutex (PERL_GET_INTERP->Imalloc_mutex) #define PL_max_intro_pending (PERL_GET_INTERP->Imax_intro_pending) #define PL_maxo (PERL_GET_INTERP->Imaxo) #define PL_maxsysfd (PERL_GET_INTERP->Imaxsysfd) @@ -581,7 +580,6 @@ #define PL_main_cv (vTHX->Imain_cv) #define PL_main_root (vTHX->Imain_root) #define PL_main_start (vTHX->Imain_start) -#define PL_malloc_mutex (vTHX->Imalloc_mutex) #define PL_max_intro_pending (vTHX->Imax_intro_pending) #define PL_maxo (vTHX->Imaxo) #define PL_maxsysfd (vTHX->Imaxsysfd) @@ -860,7 +858,6 @@ #define PL_Imain_cv PL_main_cv #define PL_Imain_root PL_main_root #define PL_Imain_start PL_main_start -#define PL_Imalloc_mutex PL_malloc_mutex #define PL_Imax_intro_pending PL_max_intro_pending #define PL_Imaxo PL_maxo #define PL_Imaxsysfd PL_maxsysfd @@ -1285,6 +1282,7 @@ #define PL_curinterp (PL_Vars.Gcurinterp) #define PL_do_undump (PL_Vars.Gdo_undump) #define PL_hexdigit (PL_Vars.Ghexdigit) +#define PL_malloc_mutex (PL_Vars.Gmalloc_mutex) #define PL_patleave (PL_Vars.Gpatleave) #else /* !PERL_GLOBAL_STRUCT */ @@ -1294,6 +1292,7 @@ #define PL_Gcurinterp PL_curinterp #define PL_Gdo_undump PL_do_undump #define PL_Ghexdigit PL_hexdigit +#define PL_Gmalloc_mutex PL_malloc_mutex #define PL_Gpatleave PL_patleave #endif /* PERL_GLOBAL_STRUCT */ diff --git a/intrpvar.h b/intrpvar.h index 1a8b1bfe1f..a60620f6c3 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -369,7 +369,6 @@ PERLVAR(Ifilter_debug, int) #ifdef USE_THREADS PERLVAR(Ithr_key, perl_key) /* For per-thread struct perl_thread* */ PERLVAR(Isv_mutex, perl_mutex) /* Mutex for allocating SVs in sv.c */ -PERLVAR(Imalloc_mutex, perl_mutex) /* Mutex for malloc */ PERLVAR(Ieval_mutex, perl_mutex) /* Mutex for doeval */ PERLVAR(Ieval_cond, perl_cond) /* Condition variable for doeval */ PERLVAR(Ieval_owner, struct perl_thread *) @@ -274,8 +274,6 @@ #define PL_main_root (*Perl_Imain_root_ptr(aTHXo)) #undef PL_main_start #define PL_main_start (*Perl_Imain_start_ptr(aTHXo)) -#undef PL_malloc_mutex -#define PL_malloc_mutex (*Perl_Imalloc_mutex_ptr(aTHXo)) #undef PL_max_intro_pending #define PL_max_intro_pending (*Perl_Imax_intro_pending_ptr(aTHXo)) #undef PL_maxo @@ -830,6 +828,8 @@ #define PL_do_undump (*Perl_Gdo_undump_ptr(NULL)) #undef PL_hexdigit #define PL_hexdigit (*Perl_Ghexdigit_ptr(NULL)) +#undef PL_malloc_mutex +#define PL_malloc_mutex (*Perl_Gmalloc_mutex_ptr(NULL)) #undef PL_patleave #define PL_patleave (*Perl_Gpatleave_ptr(NULL)) @@ -811,7 +811,6 @@ S_parse_body(pTHX_ va_list args) #else sv_catpv(PL_Sv,"print \"\\nCharacteristics of this binary (from libperl): \\n\","); #endif -#if defined(DEBUGGING) || defined(MULTIPLICITY) sv_catpv(PL_Sv,"\" Compile-time options:"); # ifdef DEBUGGING sv_catpv(PL_Sv," DEBUGGING"); @@ -819,8 +818,20 @@ S_parse_body(pTHX_ va_list args) # ifdef MULTIPLICITY sv_catpv(PL_Sv," MULTIPLICITY"); # endif +# ifdef USE_THREADS + sv_catpv(PL_Sv," USE_THREADS"); +# endif +# ifdef PERL_OBJECT + sv_catpv(PL_Sv," PERL_OBJECT"); +# endif +# ifdef PERL_IMPLICIT_CONTEXT + sv_catpv(PL_Sv," PERL_IMPLICIT_CONTEXT"); +# endif +# ifdef PERL_IMPLICIT_SYS + sv_catpv(PL_Sv," PERL_IMPLICIT_SYS"); +# endif sv_catpv(PL_Sv,"\\n\","); -#endif + #if defined(LOCAL_PATCH_COUNT) if (LOCAL_PATCH_COUNT > 0) { int i; diff --git a/perlvars.h b/perlvars.h index 664164dbcd..ecb450e426 100644 --- a/perlvars.h +++ b/perlvars.h @@ -30,3 +30,7 @@ PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}") /* XXX does anyone even use this? */ PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */ + +#ifdef MYMALLOC +PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */ +#endif |