summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-09-22 18:43:23 -0600
committerKarl Williamson <khw@cpan.org>2022-09-29 13:08:27 -0600
commitf9a327adedce01ce79cc9d5be72f9816c26a6a5c (patch)
tree021bb2c5fa8f029cc40e35b62fb8538399fa20e5 /perl.h
parent6700fa0429aa6b3c06e76e4d2187944d46c59d8e (diff)
downloadperl-f9a327adedce01ce79cc9d5be72f9816c26a6a5c.tar.gz
Add mutexes for various libc calls
There are various system calls used by perl that need to be protected by a mutex in some configurations. This commit adds the ones not previously added, for use in future commits. Further details are in the merge commit message for this series of commits.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 191a8b0289..0263fd2282 100644
--- a/perl.h
+++ b/perl.h
@@ -7152,6 +7152,7 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
# define LC_NUMERIC_UNLOCK NOOP
#endif
+ /* These non-reentrant versions use global space */
# define MBLEN_LOCK_ gwLOCALE_LOCK
# define MBLEN_UNLOCK_ gwLOCALE_UNLOCK
@@ -7161,6 +7162,22 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
# define WCTOMB_LOCK_ gwLOCALE_LOCK
# define WCTOMB_UNLOCK_ gwLOCALE_UNLOCK
+ /* Whereas the reentrant versions don't (assuming they are called with a
+ * per-thread buffer; some have the capability of being called with a NULL
+ * parameter, which defeats the reentrancy) */
+# define MBRLEN_LOCK_ NOOP
+# define MBRLEN_UNLOCK_ NOOP
+# define MBRTOWC_LOCK_ NOOP
+# define MBRTOWC_UNLOCK_ NOOP
+# define WCRTOMB_LOCK_ NOOP
+# define WCRTOMB_UNLOCK_ NOOP
+
+# define LC_COLLATE_LOCK SETLOCALE_LOCK
+# define LC_COLLATE_UNLOCK SETLOCALE_UNLOCK
+
+# define STRFTIME_LOCK ENV_LOCK
+# define STRFTIME_UNLOCK ENV_UNLOCK
+
#ifdef USE_LOCALE_NUMERIC
/* These macros are for toggling between the underlying locale (UNDERLYING or