diff options
author | Karl Williamson <khw@cpan.org> | 2021-03-08 05:46:25 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-09-21 14:34:41 -0600 |
commit | b67f5ec46d9174613265ab5bb0282ab93effcf46 (patch) | |
tree | 473381f246cc14154d773d0b7701e27ba31e879c /perl.h | |
parent | 2b85ca2c27f8299bfae0ef634ee0590505f5c01c (diff) | |
download | perl-b67f5ec46d9174613265ab5bb0282ab93effcf46.tar.gz |
perl.h: Move LOCALE_READ_LOCK #definition
To enable future simplifications
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -7148,15 +7148,9 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect. MUTEX_DESTROY(&PL_locale_mutex); \ } STMT_END #endif -#if ! ( defined(USE_LOCALE) \ +#if ! ( defined(USE_LOCALE) \ && defined(USE_LOCALE_THREADS) \ && ( ! defined(USE_THREAD_SAFE_LOCALE))) - -/* The whole expression just above was complemented, so here we have no need - * for thread synchronization, most likely it would be that this isn't a - * threaded build. */ -# define LOCALE_READ_LOCK NOOP -# define LOCALE_READ_UNLOCK NOOP #else /* Here, we will need critical sections in locale handling, because one or @@ -7236,6 +7230,11 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect. # define SETLOCALE_UNLOCK NOOP #endif +/* Currently, the read lock is an exclusive lock */ +#define LOCALE_READ_LOCK SETLOCALE_LOCK +#define LOCALE_READ_UNLOCK SETLOCALE_UNLOCK + + #ifndef LC_NUMERIC_LOCK # define LC_NUMERIC_LOCK(cond) NOOP # define LC_NUMERIC_UNLOCK NOOP |