From a863c7d16499251f020c5d26d232aa865fa0b197 Mon Sep 17 00:00:00 2001 From: Malcolm Beattie Date: Fri, 31 Oct 1997 18:05:31 +0000 Subject: Half way through moving per-thread magicals into per-thread fields and the associated new OP_SPECIFIC and find_thread_magical stuff. perl will compile but plenty of the magicals are still broken. p4raw-id: //depot/perl@195 --- thread.h | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'thread.h') diff --git a/thread.h b/thread.h index fb6a7c05ce..d8da3ee4b6 100644 --- a/thread.h +++ b/thread.h @@ -171,10 +171,25 @@ struct thread { /* Now the fields that used to be "per interpreter" (even when global) */ - /* XXX What about magic variables such as $/, $? and so on? */ + /* Fields used by magic variables such as $@, $/ and so on */ + bool Ttainted; + PMOP * Tcurpm; + SV * Tnrs; + SV * Trs; + GV * Tlast_in_gv; + char * Tofs; + STRLEN Tofslen; + GV * Tdefoutgv; + char * Tchopset; + SV * Tformtarget; + SV * Tbodytarget; + SV * Ttoptarget; + + /* Stashes */ HV * Tdefstash; HV * Tcurstash; + /* Stacks */ SV ** Ttmps_stack; I32 Ttmps_ix; I32 Ttmps_floor; @@ -202,6 +217,7 @@ struct thread { HV * Tcvcache; perl_thread self; /* Underlying thread object */ U32 flags; + AV * specific; /* Thread specific data (& magicals) */ perl_mutex mutex; /* For the fields others can change */ U32 tid; struct thread *next, *prev; /* Circular linked list of threads */ @@ -277,6 +293,18 @@ typedef struct condpair { #undef Xpv #undef statbuf #undef timesbuf +#undef tainted +#undef curpm +#undef nrs +#undef rs +#undef last_in_gv +#undef ofs +#undef ofslen +#undef defoutgv +#undef chopset +#undef formtarget +#undef bodytarget +#undef toptarget #undef top_env #undef runlevel #undef in_eval @@ -323,6 +351,18 @@ typedef struct condpair { #define Xpv (thr->TXpv) #define statbuf (thr->Tstatbuf) #define timesbuf (thr->Ttimesbuf) +#define tainted (thr->Ttainted) +#define tainted (thr->Ttainted) +#define curpm (thr->Tcurpm) +#define nrs (thr->Tnrs) +#define rs (thr->Trs) +#define last_in_gv (thr->Tlast_in_gv) +#define ofs (thr->Tofs) +#define defoutgv (thr->Tdefoutgv) +#define chopset (thr->Tchopset) +#define formtarget (thr->Tformtarget) +#define bodytarget (thr->Tbodytarget) +#define toptarget (thr->Ttoptarget) #define defstash (thr->Tdefstash) #define curstash (thr->Tcurstash) -- cgit v1.2.1