Skip to content

Commit ddd5ebe

Browse files
committed
perl.h: Add debugging statements for mutex ops
1 parent 49d7d36 commit ddd5ebe

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

perl.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5632,8 +5632,18 @@ typedef struct am_table_short AMTS;
56325632
* LC_NUMERIC_LOCK may span more operations. By always following this
56335633
* convention, deadlock should be impossible. But if necessary, the two
56345634
* mutexes could be combined */
5635-
# define LOCALE_LOCK MUTEX_LOCK(&PL_locale_mutex)
5636-
# define LOCALE_UNLOCK MUTEX_UNLOCK(&PL_locale_mutex)
5635+
# define LOCALE_LOCK \
5636+
STMT_START { \
5637+
DEBUG_Lv(PerlIO_printf(Perl_debug_log, \
5638+
"%s: %d: locking locale\n", __FILE__, __LINE__)); \
5639+
MUTEX_LOCK(&PL_locale_mutex); \
5640+
} STMT_END
5641+
# define LOCALE_UNLOCK \
5642+
STMT_START { \
5643+
DEBUG_Lv(PerlIO_printf(Perl_debug_log, \
5644+
"%s: %d: unlocking locale\n", __FILE__, __LINE__)); \
5645+
MUTEX_UNLOCK(&PL_locale_mutex); \
5646+
} STMT_END
56375647

56385648
# define LOCALE_TERM \
56395649
STMT_START { \

0 commit comments

Comments
 (0)