summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-09-24 03:36:30 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-09-24 03:36:30 +0000
commit5f08fbcd6341ee0f8f3c7dfe721098c3bfae1c67 (patch)
treea70127e53b67320af4d734e666f8494d502244f6 /perl.c
parent34b5802582e6ac0ab95ef6940fa408896842b141 (diff)
downloadperl-5f08fbcd6341ee0f8f3c7dfe721098c3bfae1c67.tar.gz
provide locked access to string table for USE_THREADS
p4raw-id: //depot/perl@1863
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 79fab4a4ef..a5bb53649a 100644
--- a/perl.c
+++ b/perl.c
@@ -553,6 +553,7 @@ perl_destruct(register PerlInterpreter *sv_interp)
DEBUG_P(debprofdump());
#ifdef USE_THREADS
+ MUTEX_DESTROY(&PL_strtab_mutex);
MUTEX_DESTROY(&PL_sv_mutex);
MUTEX_DESTROY(&PL_eval_mutex);
COND_DESTROY(&PL_eval_cond);
@@ -1905,6 +1906,9 @@ init_main_stash(void)
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
+ MUTEX_INIT(&PL_strtab_mutex);
+#endif
HvSHAREKEYS_off(PL_strtab); /* mandatory */
hv_ksplit(PL_strtab, 512);