diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-14 22:02:49 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-14 22:02:49 +0000 |
commit | 05ec9bb346c404c8906ed1ac374d4bce61c84f5d (patch) | |
tree | c0c3deb21e984b2371d1058155b645467055217d /scope.h | |
parent | e567eb179f8c37fa2e2a16e90180982901849683 (diff) | |
download | perl-05ec9bb346c404c8906ed1ac374d4bce61c84f5d.tar.gz |
Use PerlMemShared for CopSTASHPV and CopFILE. MUCH harder than it sounds!
Need to use CopXXXXX macros everywhere and add CopSTASH_free
Add new scope type and add support for it to scope.c and scope stack
dup-er in sv.c. Add savesharedpv().
Also zealous version of Win32's vmem.h to catch all the abuses.
With this t/op/fork.t passes even with zealous checking and
checker is point a finger at various threads/shared issues.
PL_curcop->cop_io is still an issue.
p4raw-id: //depot/perlio@14259
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -35,6 +35,7 @@ #define SAVEt_GENERIC_PVREF 34 #define SAVEt_PADSV 35 #define SAVEt_MORTALIZESV 36 +#define SAVEt_SHARED_PVREF 37 #ifndef SCOPE_SAVES_SIGNAL_MASK #define SCOPE_SAVES_SIGNAL_MASK 0 @@ -117,6 +118,7 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. #define SAVECLEARSV(sv) save_clearsv(SOFT_CAST(SV**)&(sv)) #define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) #define SAVEGENERICPV(s) save_generic_pvref((char**)&(s)) +#define SAVESHAREDPV(s) save_shared_pvref((char**)&(s)) #define SAVEDELETE(h,k,l) \ save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l)) #define SAVEDESTRUCTOR(f,p) \ @@ -160,9 +162,9 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. #ifdef USE_ITHREADS # define SAVECOPSTASH(c) SAVEPPTR(CopSTASHPV(c)) -# define SAVECOPSTASH_FREE(c) SAVEGENERICPV(CopSTASHPV(c)) +# define SAVECOPSTASH_FREE(c) SAVESHAREDPV(CopSTASHPV(c)) # define SAVECOPFILE(c) SAVEPPTR(CopFILE(c)) -# define SAVECOPFILE_FREE(c) SAVEGENERICPV(CopFILE(c)) +# define SAVECOPFILE_FREE(c) SAVESHAREDPV(CopFILE(c)) #else # define SAVECOPSTASH(c) SAVESPTR(CopSTASH(c)) # define SAVECOPSTASH_FREE(c) SAVECOPSTASH(c) /* XXX not refcounted */ |