summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-03-08 05:46:25 -0700
committerKarl Williamson <khw@cpan.org>2022-09-21 14:34:41 -0600
commitb67f5ec46d9174613265ab5bb0282ab93effcf46 (patch)
tree473381f246cc14154d773d0b7701e27ba31e879c /perl.h
parent2b85ca2c27f8299bfae0ef634ee0590505f5c01c (diff)
downloadperl-b67f5ec46d9174613265ab5bb0282ab93effcf46.tar.gz
perl.h: Move LOCALE_READ_LOCK #definition
To enable future simplifications
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/perl.h b/perl.h
index 3c7513e6a5..bca762f6f5 100644
--- a/perl.h
+++ b/perl.h
@@ -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