summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc4
-rw-r--r--embed.h8
-rw-r--r--intrpvar.h9
-rw-r--r--mathoms.c2
-rw-r--r--perl.c9
-rw-r--r--proto.h4
6 files changed, 24 insertions, 12 deletions
diff --git a/embed.fnc b/embed.fnc
index 9cd0ff1a1a..4d46a2ae5a 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1012,7 +1012,11 @@ pMX |int |sv_release_IVX |NN SV *sv
Adp |void |sv_nosharing |NULLOK SV *sv
Adpbm |void |sv_nolocking |NULLOK SV *sv
+#ifdef NO_MATHOMS
Adpbm |void |sv_nounlocking |NULLOK SV *sv
+#else
+Adpb |void |sv_nounlocking |NULLOK SV *sv
+#endif
Adp |int |nothreadhook
END_EXTERN_C
diff --git a/embed.h b/embed.h
index a8867d8a32..745aad72e4 100644
--- a/embed.h
+++ b/embed.h
@@ -1027,6 +1027,10 @@
#endif
#endif
#define sv_nosharing Perl_sv_nosharing
+#ifdef NO_MATHOMS
+#else
+#define sv_nounlocking Perl_sv_nounlocking
+#endif
#define nothreadhook Perl_nothreadhook
#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
@@ -3067,6 +3071,10 @@
#endif
#endif
#define sv_nosharing(a) Perl_sv_nosharing(aTHX_ a)
+#ifdef NO_MATHOMS
+#else
+#define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
+#endif
#define nothreadhook() Perl_nothreadhook(aTHX)
#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
diff --git a/intrpvar.h b/intrpvar.h
index aa0f0c3365..3d3db7aafb 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -484,7 +484,14 @@ PERLVAR(Ireentrant_retint, int) /* Integer return value from reentrant functions
/* Hooks to shared SVs and locks. */
PERLVARI(Isharehook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
PERLVARI(Ilockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
-PERLVARI(Iunlockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
+#ifdef NO_MATHOMS
+# define PERL_UNLOCK_HOOK Perl_sv_nosharing
+#else
+/* This reference ensures that the mathoms are linked with perl */
+# define PERL_UNLOCK_HOOK Perl_sv_nounlocking
+#endif
+PERLVARI(Iunlockhook, share_proc_t, MEMBER_TO_FPTR(PERL_UNLOCK_HOOK))
+
PERLVARI(Ithreadhook, thrhook_proc_t, MEMBER_TO_FPTR(Perl_nothreadhook))
/* Force inclusion of both runops options */
diff --git a/mathoms.c b/mathoms.c
index d3713f56d5..2acdb420b4 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -29,8 +29,6 @@
#define PERL_IN_MATHOMS_C
#include "perl.h"
-void Perl_mathoms(void) {}
-
/* ref() is now a macro using Perl_doref;
* this version provided for binary compatibility only.
*/
diff --git a/perl.c b/perl.c
index 68c597b00b..82960f3a37 100644
--- a/perl.c
+++ b/perl.c
@@ -137,15 +137,6 @@ static I32 read_e_script(pTHX_ int idx, SV *buf_sv, int maxlen);
#endif
#endif
-#ifndef NO_MATHOMS
-/* This reference ensures that the mathoms are linked with perl */
-extern void Perl_mathoms(void);
-void Perl_mathoms_ref(void);
-void Perl_mathoms_ref(void) {
- Perl_mathoms();
-}
-#endif
-
static void
S_init_tls_and_interp(PerlInterpreter *my_perl)
{
diff --git a/proto.h b/proto.h
index f401ade66f..6272c7628a 100644
--- a/proto.h
+++ b/proto.h
@@ -2808,7 +2808,11 @@ PERL_CALLCONV int Perl_sv_release_IVX(pTHX_ SV *sv)
PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *sv);
/* PERL_CALLCONV void Perl_sv_nolocking(pTHX_ SV *sv); */
+#ifdef NO_MATHOMS
/* PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv); */
+#else
+PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv);
+#endif
PERL_CALLCONV int Perl_nothreadhook(pTHX);
END_EXTERN_C