summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-03-07 19:56:18 -0700
committerKarl Williamson <khw@cpan.org>2022-09-09 12:26:40 -0600
commitda1b79a9e089c13238fc509948c252d2cb15ebde (patch)
treeaf7386195d02ef3fed018515c37348e823746c21 /sv.c
parent365895b0a743bbcceaf0757b4b04c0c59ecb184a (diff)
downloadperl-da1b79a9e089c13238fc509948c252d2cb15ebde.tar.gz
Make the locale mutex a general semaphore
Future commits will use this new capability, and in Configurations where no locale locking is currently necessary.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 5636551575..de6dc8070f 100644
--- a/sv.c
+++ b/sv.c
@@ -15600,6 +15600,11 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
/* Did the locale setup indicate UTF-8? */
PL_utf8locale = proto_perl->Iutf8locale;
+
+#ifdef USE_LOCALE_THREADS
+ assert(PL_locale_mutex_depth <= 0);
+ PL_locale_mutex_depth = 0;
+#endif
#if defined(USE_ITHREADS) && ! defined(USE_THREAD_SAFE_LOCALE)
PL_lc_numeric_mutex_depth = 0;
#endif