diff options
author | Karl Williamson <khw@cpan.org> | 2020-11-29 17:05:13 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-08 06:44:20 -0700 |
commit | 8609fe004ed37605b00f517feb6e9c8eb127952c (patch) | |
tree | 070ce503e363588c6a6012e527e46fa989b4eed4 | |
parent | cfaae47f842a064f1d08fc0cd008d997947d057a (diff) | |
download | perl-8609fe004ed37605b00f517feb6e9c8eb127952c.tar.gz |
Change name of mutex macro.
This macro is for localeconv(); the new name is clearer as to the
meaning, and this preps for further changes.
-rw-r--r-- | ext/POSIX/POSIX.xs | 6 | ||||
-rw-r--r-- | locale.c | 14 | ||||
-rw-r--r-- | perl.h | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 139ee89ca7..0f750c0dc6 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -2185,8 +2185,8 @@ localeconv() lcbuf = localeconv_l(cur); # else - LOCALE_LOCK_V; /* Prevent interference with other threads using - localeconv() */ + LOCALECONV_LOCK; /* Prevent interference with other threads using + localeconv() */ # ifdef TS_W32_BROKEN_LOCALECONV /* This is a workaround for a Windows bug prior to VS 15, in which * localeconv only looks at the global locale. We toggle to the global @@ -2271,7 +2271,7 @@ localeconv() Safefree(save_global); Safefree(save_thread); # endif - LOCALE_UNLOCK_V; + LOCALECONV_UNLOCK; # endif RESTORE_LC_NUMERIC(); #endif /* HAS_LOCALECONV */ @@ -2819,8 +2819,8 @@ S_my_nl_langinfo(const int item, bool toggle) /* We don't bother with localeconv_l() because any system that * has it is likely to also have nl_langinfo() */ - LOCALE_LOCK_V; /* Prevent interference with other threads - using localeconv() */ + LOCALECONV_LOCK; /* Prevent interference with other threads + using localeconv() */ # ifdef TS_W32_BROKEN_LOCALECONV @@ -2847,7 +2847,7 @@ S_my_nl_langinfo(const int item, bool toggle) || ! lc->currency_symbol || strEQ("", lc->currency_symbol)) { - LOCALE_UNLOCK_V; + LOCALECONV_UNLOCK; return ""; } @@ -2877,7 +2877,7 @@ S_my_nl_langinfo(const int item, bool toggle) # endif - LOCALE_UNLOCK_V; + LOCALECONV_UNLOCK; break; # ifdef TS_W32_BROKEN_LOCALECONV @@ -2950,8 +2950,8 @@ S_my_nl_langinfo(const int item, bool toggle) STORE_LC_NUMERIC_FORCE_TO_UNDERLYING(); } - LOCALE_LOCK_V; /* Prevent interference with other threads - using localeconv() */ + LOCALECONV_LOCK; /* Prevent interference with other threads + using localeconv() */ # ifdef TS_W32_BROKEN_LOCALECONV @@ -3003,7 +3003,7 @@ S_my_nl_langinfo(const int item, bool toggle) # endif - LOCALE_UNLOCK_V; + LOCALECONV_UNLOCK; if (toggle) { RESTORE_LC_NUMERIC(); @@ -6522,13 +6522,13 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect. * a few places where there is a broken localeconv(), but otherwise things are * thread safe, and hence don't need locking. Just below LOCALE_LOCK and * LOCALE_UNLOCK are defined in terms of these for use everywhere else */ -# define LOCALE_LOCK_V \ +# define LOCALECONV_LOCK \ STMT_START { \ DEBUG_Lv(PerlIO_printf(Perl_debug_log, \ "%s: %d: locking locale\n", __FILE__, __LINE__)); \ MUTEX_LOCK(&PL_locale_mutex); \ } STMT_END -# define LOCALE_UNLOCK_V \ +# define LOCALECONV_UNLOCK \ STMT_START { \ DEBUG_Lv(PerlIO_printf(Perl_debug_log, \ "%s: %d: unlocking locale\n", __FILE__, __LINE__)); \ @@ -6544,8 +6544,8 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect. # define LC_NUMERIC_LOCK(cond) # define LC_NUMERIC_UNLOCK # else -# define LOCALE_LOCK LOCALE_LOCK_V -# define LOCALE_UNLOCK LOCALE_UNLOCK_V +# define LOCALE_LOCK LOCALECONV_LOCK +# define LOCALE_UNLOCK LOCALECONV_UNLOCK /* We also need to lock LC_NUMERIC for non-windows (hence Posix 2008) * systems */ @@ -6625,9 +6625,9 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect. #else /* Below is no locale sync needed */ # define LOCALE_INIT # define LOCALE_LOCK -# define LOCALE_LOCK_V +# define LOCALECONV_LOCK # define LOCALE_UNLOCK -# define LOCALE_UNLOCK_V +# define LOCALECONV_UNLOCK # define LC_NUMERIC_LOCK(cond) # define LC_NUMERIC_UNLOCK # define LOCALE_TERM |