diff options
author | Karl Williamson <khw@cpan.org> | 2018-02-13 16:53:43 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-02-18 15:44:23 -0700 |
commit | ddd5ebe0cadc81a0360ad8007674490fda89ee88 (patch) | |
tree | 18c3a4c0017378946c951d31bbb1dce761112293 | |
parent | 49d7d366441813aa7301b1a437e302372f04f31a (diff) | |
download | perl-ddd5ebe0cadc81a0360ad8007674490fda89ee88.tar.gz |
perl.h: Add debugging statements for mutex ops
-rw-r--r-- | perl.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 { \ |