From cd1ee231f67664d7a2f2d53512a707d2736dbb0e Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 13 Aug 2001 12:45:21 +0000 Subject: [PATHC] sharedsv.[c|h] From: "Artur Bergman" Date: Mon, 13 Aug 2001 14:38:41 +0200 Message-ID: <005401c123f4$e1f53360$21000a0a@vogw2kdev> Subject: [PATCH] embed.pl From: Arthur Bergman Date: Mon, 13 Aug 2001 14:38:14 +0200 Message-ID: Subject: [PATCH] sharedsv cleanups From: "Arthur Bergman" Date: Mon, 13 Aug 2001 15:14:25 +0200 Message-ID: <005a01c123f9$dfe525d0$21000a0a@vogw2kdev> Plus few tweaks: _init needs to be Adp, the prototypes should not be revealed unless using ithreads, #endif FOO must be #endif /* FOO */, adding (parentheses) around do { } while doesn't work too well. p4raw-id: //depot/perl@11659 --- embed.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'embed.h') diff --git a/embed.h b/embed.h index 9093f9bd0f..a83e0b81b5 100644 --- a/embed.h +++ b/embed.h @@ -1066,6 +1066,16 @@ #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) #define save_scalar_at S_save_scalar_at #endif +#if defined(USE_ITHREADS) && (defined(PERL_IN_SHAREDSV_C) || defined(PERL_DECL_PROT)) +#define sharedsv_init Perl_sharedsv_init +#define sharedsv_new Perl_sharedsv_new +#define sharedsv_find Perl_sharedsv_find +#define sharedsv_lock Perl_sharedsv_lock +#define sharedsv_unlock Perl_sharedsv_unlock +#define sharedsv_unlock_scope Perl_sharedsv_unlock_scope +#define sharedsv_thrcnt_inc Perl_sharedsv_thrcnt_inc +#define sharedsv_thrcnt_dec Perl_sharedsv_thrcnt_dec +#endif #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) #define asIV S_asIV #define asUV S_asUV @@ -2570,6 +2580,16 @@ #if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) #define save_scalar_at(a) S_save_scalar_at(aTHX_ a) #endif +#if defined(USE_ITHREADS) && (defined(PERL_IN_SHAREDSV_C) || defined(PERL_DECL_PROT)) +#define sharedsv_init() Perl_sharedsv_init(aTHX) +#define sharedsv_new() Perl_sharedsv_new(aTHX) +#define sharedsv_find(a) Perl_sharedsv_find(aTHX_ a) +#define sharedsv_lock(a) Perl_sharedsv_lock(aTHX_ a) +#define sharedsv_unlock(a) Perl_sharedsv_unlock(aTHX_ a) +#define sharedsv_unlock_scope(a) Perl_sharedsv_unlock_scope(aTHX_ a) +#define sharedsv_thrcnt_inc(a) Perl_sharedsv_thrcnt_inc(aTHX_ a) +#define sharedsv_thrcnt_dec(a) Perl_sharedsv_thrcnt_dec(aTHX_ a) +#endif #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) #define asIV(a) S_asIV(aTHX_ a) #define asUV(a) S_asUV(aTHX_ a) @@ -5010,6 +5030,24 @@ #define S_save_scalar_at CPerlObj::S_save_scalar_at #define save_scalar_at S_save_scalar_at #endif +#if defined(USE_ITHREADS) && (defined(PERL_IN_SHAREDSV_C) || defined(PERL_DECL_PROT)) +#define Perl_sharedsv_init CPerlObj::Perl_sharedsv_init +#define sharedsv_init Perl_sharedsv_init +#define Perl_sharedsv_new CPerlObj::Perl_sharedsv_new +#define sharedsv_new Perl_sharedsv_new +#define Perl_sharedsv_find CPerlObj::Perl_sharedsv_find +#define sharedsv_find Perl_sharedsv_find +#define Perl_sharedsv_lock CPerlObj::Perl_sharedsv_lock +#define sharedsv_lock Perl_sharedsv_lock +#define Perl_sharedsv_unlock CPerlObj::Perl_sharedsv_unlock +#define sharedsv_unlock Perl_sharedsv_unlock +#define Perl_sharedsv_unlock_scope CPerlObj::Perl_sharedsv_unlock_scope +#define sharedsv_unlock_scope Perl_sharedsv_unlock_scope +#define Perl_sharedsv_thrcnt_inc CPerlObj::Perl_sharedsv_thrcnt_inc +#define sharedsv_thrcnt_inc Perl_sharedsv_thrcnt_inc +#define Perl_sharedsv_thrcnt_dec CPerlObj::Perl_sharedsv_thrcnt_dec +#define sharedsv_thrcnt_dec Perl_sharedsv_thrcnt_dec +#endif #if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) #define S_asIV CPerlObj::S_asIV #define asIV S_asIV -- cgit v1.2.1