Skip to content

Commit 1e0ff1d

Browse files
FractalBoykhwilliamson
authored andcommitted
Add perl_tsa_mutex_* to exported functions
When PERL_TSA_ACTIVE is defined, perl_tsa_mutex_lock and perl_tsa_mutex_unlock are required to be defined. However, they are not exported so they cannot be used by core extensions such as re.
1 parent 80b607a commit 1e0ff1d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

makedef.pl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,13 @@ sub readvar {
11661166
));
11671167
}
11681168

1169+
if ($define{USE_ITHREADS} && $define{I_PTHREAD}) {
1170+
try_symbols(qw(
1171+
perl_tsa_mutex_lock
1172+
perl_tsa_mutex_unlock
1173+
));
1174+
}
1175+
11691176
# When added this code was only run for Win32 (and WinCE at the time)
11701177
# Currently only Win32 links static extensions into the shared library.
11711178
# For *nix (and presumably OS/2) with a shared libperl, Makefile.SH compiles

perl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3752,6 +3752,9 @@ EXTERN_C int perl_tsa_mutex_lock(perl_mutex* mutex)
37523752
EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex)
37533753
PERL_TSA_RELEASE(*mutex)
37543754
PERL_TSA_NO_TSA;
3755+
#elif defined(USE_ITHREADS) && defined(I_PTHREAD)
3756+
EXTERN_C int perl_tsa_mutex_lock(perl_mutex* mutex);
3757+
EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex);
37553758
#endif
37563759

37573760
#if defined(WIN32)

0 commit comments

Comments
 (0)