summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-31 18:05:31 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-31 18:05:31 +0000
commita863c7d16499251f020c5d26d232aa865fa0b197 (patch)
tree9a4ae00010863431f84e1aa26d6e2cefe89dd514 /thread.h
parent46930d8f1568c61dcd2ab37f6a2924dc79596ffc (diff)
downloadperl-a863c7d16499251f020c5d26d232aa865fa0b197.tar.gz
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
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h42
1 files changed, 41 insertions, 1 deletions
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)