diff options
author | Karl Williamson <khw@cpan.org> | 2021-03-13 20:51:58 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-09-09 12:26:40 -0600 |
commit | 05b43cb096b63fe71b7d2ce2dc00e0f7ee0f2903 (patch) | |
tree | 81b7268d6b806b1f7a86906701c5f7a379a3d002 /makedef.pl | |
parent | da1b79a9e089c13238fc509948c252d2cb15ebde (diff) | |
download | perl-05b43cb096b63fe71b7d2ce2dc00e0f7ee0f2903.tar.gz |
Use general locale mutex for numeric operations
This commit removes the separate mutex for locking locale-related
numeric operations on threaded perls; instead using the general locale
one. The previous commit made that a general semaphore, so now suitable
for use for this purpose as well.
This means that the locale can be locked for the duration of some
sprintf operations, longer than before this commit. But on most modern
platforms, thread-safe locales cause this lock to expand just to a
no-op; so there is no effect on these. And on the impacted platforms,
one is not supposed to be using locales and threads in combination, as
races can occur. This lock is used on those perls to keep Perl's
manipulation of LC_NUMERIC thread-safe. And for those there is also no
effect, as they already lock around those sprintf's.
Diffstat (limited to 'makedef.pl')
-rw-r--r-- | makedef.pl | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/makedef.pl b/makedef.pl index f91fa8c233..d2d5e53a10 100644 --- a/makedef.pl +++ b/makedef.pl @@ -379,8 +379,6 @@ unless ($define{'USE_ITHREADS'}) { PL_hints_mutex PL_locale_mutex PL_locale_mutex_depth - PL_lc_numeric_mutex - PL_lc_numeric_mutex_depth PL_my_ctx_mutex PL_perlio_mutex PL_stashpad @@ -454,11 +452,6 @@ unless ($define{'MULTIPLICITY'}) { ); } -if ($define{USE_THREAD_SAFE_LOCALE}) { - ++$skip{PL_lc_numeric_mutex}; - ++$skip{PL_lc_numeric_mutex_depth}; -} - unless ($define{'USE_DTRACE'}) { ++$skip{$_} foreach qw( Perl_dtrace_probe_call |