diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-24 22:41:17 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-24 22:41:17 +0000 |
commit | 74a2feed3f7ab8f6e9b1144cca2f3eb4f6fd9498 (patch) | |
tree | dac87e6bb9e03f8c6def86a3431360202ee83845 /win32 | |
parent | 1c39adb236b2a53b282c5bb8af25d8436eebf688 (diff) | |
download | perl-74a2feed3f7ab8f6e9b1144cca2f3eb4f6fd9498.tar.gz |
avoid race condition in the CAPI extension bootstrap handler
p4raw-id: //depot/perl@3549
Diffstat (limited to 'win32')
-rw-r--r-- | win32/GenCAPI.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/win32/GenCAPI.pl b/win32/GenCAPI.pl index 60d199de27..63688af163 100644 --- a/win32/GenCAPI.pl +++ b/win32/GenCAPI.pl @@ -527,6 +527,7 @@ readvars %globvar, '..\perlvars.h','G'; open(HDRFILE, ">$hdrfile") or die "$0: Can't open $hdrfile: $!\n"; print HDRFILE <<ENDCODE; void SetCPerlObj(void* pP); +void boot_CAPI_handler(CV *cv, void (*subaddr)(CV *c), void *pP); CV* Perl_newXS(char* name, void (*subaddr)(CV* cv), char* filename); ENDCODE @@ -598,6 +599,14 @@ U32 * _Perl_opargs(void) return pPerl->Perl_get_opargs(); } +void boot_CAPI_handler(CV *cv, void (*subaddr)(CV *c), void *pP) +{ +#ifndef NO_XSLOCKS + XSLock localLock((CPerlObj*)pP); +#endif + subaddr(cv); +} + void xs_handler(CV* cv, CPerlObj* p) { void(*func)(CV*); |