summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-02-13 16:53:43 -0700
committerKarl Williamson <khw@cpan.org>2018-02-18 15:44:23 -0700
commitddd5ebe0cadc81a0360ad8007674490fda89ee88 (patch)
tree18c3a4c0017378946c951d31bbb1dce761112293
parent49d7d366441813aa7301b1a437e302372f04f31a (diff)
downloadperl-ddd5ebe0cadc81a0360ad8007674490fda89ee88.tar.gz
perl.h: Add debugging statements for mutex ops
-rw-r--r--perl.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 403aca8773..9d0eab0fe1 100644
--- a/perl.h
+++ b/perl.h
@@ -5632,8 +5632,18 @@ typedef struct am_table_short AMTS;
* LC_NUMERIC_LOCK may span more operations. By always following this
* convention, deadlock should be impossible. But if necessary, the two
* mutexes could be combined */
-# define LOCALE_LOCK MUTEX_LOCK(&PL_locale_mutex)
-# define LOCALE_UNLOCK MUTEX_UNLOCK(&PL_locale_mutex)
+# define LOCALE_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 \
+ STMT_START { \
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log, \
+ "%s: %d: unlocking locale\n", __FILE__, __LINE__)); \
+ MUTEX_UNLOCK(&PL_locale_mutex); \
+ } STMT_END
# define LOCALE_TERM \
STMT_START { \