diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-25 15:04:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-25 15:04:25 +0000 |
commit | f51dccfda70076767ac517953f3cc5b809d6d728 (patch) | |
tree | 46350881eedc4b6188b4a30c5dbc2ed3898bf3a0 /perl.h | |
parent | 7eabac426e344662a69154a6ee321a7960b63cb4 (diff) | |
parent | eb1102fcca2230364ceadea29bd8e87ee51b15fa (diff) | |
download | perl-f51dccfda70076767ac517953f3cc5b809d6d728.tar.gz |
Integrate perlio:
[ 14411]
Linux/NFS hackery was not faking right number of passes.
[ 14410]
threads::shared tidy up:
- Add _id() function to shared.xs so we can test refs point at same thing.
- Use that rather that comparing stringified ref in shared/t/hv_refs.t
- Allow no_share to pass if sharing to works despite mis-ordering.
- Change docs of threads to document ->create() (as used in tests),
and not mention "new".
[ 14401]
Expand command line test globs on Win32.
[ 14393]
Except Win32 from echo tests. (Alarm does not break into connect)
[ 14392]
SvTEMP_off to stop private PV's being stolen and stored in shared space
[ 14387]
thread::shared nearly working again - remaining issue
is references withing shared space.
Added bulk test with no threads involved (for debugging)
Tuned tests to skip those needing _thrcnt
[ 14378]
Implement recursive lock and use of scope for PL_sharedsv_space,
so now croak() from asserts does not leave locks.
Make hv_simple compile (new prototype for debugging probe).
[ 14377]
Shared scalars working, some shared array ops working.
[ 14373]
Miss mg_len == 0 meaning don't Safefree
[ 14372]
XS side of new threads::shared designed, coded and compiles,
and mostly commented but is totaly untested.
submit in case anyone wants a preview.
[ 14363]
Add new threads/typemap to MANIFEST
[ 14357]
#14352 deleted ext/threads/threads.h
[ 14356]
Eradicate sharedsv.*
[ 14355]
threads work again on Win32. (Not threads::shared yet)
Submit to see if they do on Linux.
[ 14352]
Nearly-working threads re-structuring. Do not integrate,
submit-ing to get to Win32, and as "off site" backup.
p4raw-link: @14411 on //depot/perlio: 3ed9f8f7de3dfc6ca29c4acc02b797c9dd51d971
p4raw-link: @14410 on //depot/perlio: 9c4972d9e75b4597ce8eb071662b3474470a1ada
p4raw-link: @14401 on //depot/perlio: 4efb34a6d9cca053e4635f6fdedd5c6efdc554d8
p4raw-link: @14393 on //depot/perlio: 5d604bee230faa93dca054659df6c20150cd55c3
p4raw-link: @14392 on //depot/perlio: 85e0a142d02334b9703df242ba0bb3d8d109cdd0
p4raw-link: @14387 on //depot/perlio: 6b85e4fe3be6a9500d3cf5a72f618bc0f7919496
p4raw-link: @14378 on //depot/perlio: 6d56dc1c660466654588ccd5e1ccb4e636456d0f
p4raw-link: @14377 on //depot/perlio: a446a88f1d0ae9b5bdb72150525c08f417f05975
p4raw-link: @14373 on //depot/perlio: 7719e2416ec63cec924046d8e4d98affa4e7d3b0
p4raw-link: @14372 on //depot/perlio: 21312124121f8d9d8bc6674291e502b6a45ed0c7
p4raw-link: @14363 on //depot/perlio: 8fe26a07135ad5547dcddf1acc0665979f51a5f6
p4raw-link: @14357 on //depot/perlio: c6fa1bd53e9d5706a86ffc7abe1d48a50fb56696
p4raw-link: @14356 on //depot/perlio: b7491e57135e2ad2a84ac0cb80916ea08e497f99
p4raw-link: @14355 on //depot/perlio: ba14dd9ace5a84c9784d70e7ae3b0baccfea783d
p4raw-link: @14352 on //depot/perlio: 68795e9367de98482c4a5830e6e94b51bd60f4e3
p4raw-id: //depot/perl@14416
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 40 |
1 files changed, 29 insertions, 11 deletions
@@ -2150,7 +2150,6 @@ typedef I32 (*filter_t) (pTHX_ int, SV *, int); #include "scope.h" #include "warnings.h" #include "utf8.h" -#include "sharedsv.h" /* Current curly descriptor */ typedef struct curcur CURCUR; @@ -2515,7 +2514,9 @@ Gid_t getegid (void); #define PERL_MAGIC_nkeys 'k' /* scalar(keys()) lvalue */ #define PERL_MAGIC_dbfile 'L' /* Debugger %_<filename */ #define PERL_MAGIC_dbline 'l' /* Debugger %_<filename element */ -#define PERL_MAGIC_mutex 'm' /* ??? */ +#define PERL_MAGIC_mutex 'm' /* for lock op */ +#define PERL_MAGIC_shared 'N' /* Shared between threads */ +#define PERL_MAGIC_shared_scalar 'n' /* Shared between threads */ #define PERL_MAGIC_collxfrm 'o' /* Locale transformation */ #define PERL_MAGIC_tied 'P' /* Tied array or hash */ #define PERL_MAGIC_tiedelem 'p' /* Tied array or hash element */ @@ -2525,6 +2526,7 @@ Gid_t getegid (void); #define PERL_MAGIC_sigelem 's' /* %SIG hash element */ #define PERL_MAGIC_taint 't' /* Taintedness */ #define PERL_MAGIC_uvar 'U' /* Available for use by extensions */ +#define PERL_MAGIC_uvar_elem 'u' /* Reserved for use by extensions */ #define PERL_MAGIC_vec 'v' /* vec() lvalue */ #define PERL_MAGIC_substr 'x' /* substr() lvalue */ #define PERL_MAGIC_defelem 'y' /* Shadow "foreach" iterator variable / @@ -2532,13 +2534,21 @@ Gid_t getegid (void); #define PERL_MAGIC_glob '*' /* GV (typeglob) */ #define PERL_MAGIC_arylen '#' /* Array length ($#ary) */ #define PERL_MAGIC_pos '.' /* pos() lvalue */ -#define PERL_MAGIC_backref '<' /* ??? */ +#define PERL_MAGIC_backref '<' /* for weak ref data */ #define PERL_MAGIC_ext '~' /* Available for use by extensions */ #define YYMAXDEPTH 300 #ifndef assert /* <assert.h> might have been included somehow */ +#ifdef DEBUGGING +#define assert(what) DEB( { \ + if (!(what)) { \ + Perl_croak(aTHX_ "Assertion " STRINGIFY(what) " failed: file \"%s\", line %d", \ + __FILE__, __LINE__); \ + PerlProc_exit(1); \ + }}) +#else #define assert(what) DEB( { \ if (!(what)) { \ Perl_croak(aTHX_ "Assertion failed: file \"%s\", line %d", \ @@ -2546,6 +2556,7 @@ Gid_t getegid (void); PerlProc_exit(1); \ }}) #endif +#endif struct ufuncs { I32 (*uf_val)(pTHX_ IV, SV*); @@ -2763,6 +2774,7 @@ typedef Sighandler_t Sigsave_t; typedef int (CPERLscope(*runops_proc_t)) (pTHX); +typedef void (CPERLscope(*share_proc_t)) (pTHX_ SV *sv); typedef OP* (CPERLscope(*PPADDR_t)[]) (pTHX); /* _ (for $_) must be first in the following list (DEFSV requires it) */ @@ -3326,7 +3338,7 @@ START_EXTERN_C #ifdef DOINIT -EXT MGVTBL PL_vtbl_sv = {MEMBER_TO_FPTR(Perl_magic_get), +EXT MGVTBL PL_vtbl_sv = {MEMBER_TO_FPTR(Perl_magic_get), MEMBER_TO_FPTR(Perl_magic_set), MEMBER_TO_FPTR(Perl_magic_len), 0, 0}; @@ -3345,10 +3357,12 @@ EXT MGVTBL PL_vtbl_sigelem = {MEMBER_TO_FPTR(Perl_magic_getsig), 0, MEMBER_TO_FPTR(Perl_magic_clearsig), 0}; #endif -EXT MGVTBL PL_vtbl_pack = {0, 0, MEMBER_TO_FPTR(Perl_magic_sizepack), MEMBER_TO_FPTR(Perl_magic_wipepack), +EXT MGVTBL PL_vtbl_pack = {0, 0, + MEMBER_TO_FPTR(Perl_magic_sizepack), + MEMBER_TO_FPTR(Perl_magic_wipepack), 0}; EXT MGVTBL PL_vtbl_packelem = {MEMBER_TO_FPTR(Perl_magic_getpack), - MEMBER_TO_FPTR(Perl_magic_setpack), + MEMBER_TO_FPTR(Perl_magic_setpack), 0, MEMBER_TO_FPTR(Perl_magic_clearpack), 0}; EXT MGVTBL PL_vtbl_dbline = {0, MEMBER_TO_FPTR(Perl_magic_setdbline), @@ -3369,12 +3383,14 @@ EXT MGVTBL PL_vtbl_mglob = {0, MEMBER_TO_FPTR(Perl_magic_setmglob), EXT MGVTBL PL_vtbl_nkeys = {MEMBER_TO_FPTR(Perl_magic_getnkeys), MEMBER_TO_FPTR(Perl_magic_setnkeys), 0, 0, 0}; -EXT MGVTBL PL_vtbl_taint = {MEMBER_TO_FPTR(Perl_magic_gettaint),MEMBER_TO_FPTR(Perl_magic_settaint), +EXT MGVTBL PL_vtbl_taint = {MEMBER_TO_FPTR(Perl_magic_gettaint), + MEMBER_TO_FPTR(Perl_magic_settaint), 0, 0, 0}; -EXT MGVTBL PL_vtbl_substr = {MEMBER_TO_FPTR(Perl_magic_getsubstr), MEMBER_TO_FPTR(Perl_magic_setsubstr), +EXT MGVTBL PL_vtbl_substr = {MEMBER_TO_FPTR(Perl_magic_getsubstr), + MEMBER_TO_FPTR(Perl_magic_setsubstr), 0, 0, 0}; EXT MGVTBL PL_vtbl_vec = {MEMBER_TO_FPTR(Perl_magic_getvec), - MEMBER_TO_FPTR(Perl_magic_setvec), + MEMBER_TO_FPTR(Perl_magic_setvec), 0, 0, 0}; EXT MGVTBL PL_vtbl_pos = {MEMBER_TO_FPTR(Perl_magic_getpos), MEMBER_TO_FPTR(Perl_magic_setpos), @@ -3387,9 +3403,11 @@ EXT MGVTBL PL_vtbl_uvar = {MEMBER_TO_FPTR(Perl_magic_getuvar), MEMBER_TO_FPTR(Perl_magic_setuvar), 0, 0, 0}; #ifdef USE_5005THREADS -EXT MGVTBL PL_vtbl_mutex = {0, 0, 0, 0, MEMBER_TO_FPTR(Perl_magic_mutexfree)}; +EXT MGVTBL PL_vtbl_mutex = {0, 0, 0, 0, + MEMBER_TO_FPTR(Perl_magic_mutexfree)}; #endif /* USE_5005THREADS */ -EXT MGVTBL PL_vtbl_defelem = {MEMBER_TO_FPTR(Perl_magic_getdefelem),MEMBER_TO_FPTR(Perl_magic_setdefelem), +EXT MGVTBL PL_vtbl_defelem = {MEMBER_TO_FPTR(Perl_magic_getdefelem), + MEMBER_TO_FPTR(Perl_magic_setdefelem), 0, 0, 0}; EXT MGVTBL PL_vtbl_regexp = {0,0,0,0, MEMBER_TO_FPTR(Perl_magic_freeregexp)}; |