1 /***********************************************/
2 /* Global only to current thread */
3 /***********************************************/
5 /* Don't forget to re-run embed.pl to propagate changes! */
7 /* The 'T' prefix is only needed for vars that need appropriate #defines
8 * generated when built with or without USE_THREADS. It is also used
9 * to generate the appropriate export list for win32.
11 * When building without USE_THREADS, these variables will be truly global.
12 * When building without USE_THREADS but with MULTIPLICITY, these variables
13 * will be global per-interpreter.
15 * Avoid build-specific #ifdefs here, like DEBUGGING. That way,
16 * we can keep binary compatibility of the curinterp structure */
18 /* Important ones in the first cache line (if alignment is done right) */
20 PERLVAR(Tstack_sp, SV **) /* top of the stack */
22 PERLVAR(Topsave, OP *)
24 PERLVAR(Top, OP *) /* currently executing op */
26 PERLVAR(Tcurpad, SV **) /* active pad (lexicals+tmps) */
28 PERLVAR(Tstack_base, SV **)
29 PERLVAR(Tstack_max, SV **)
31 PERLVAR(Tscopestack, I32 *) /* scopes we've ENTERed */
32 PERLVAR(Tscopestack_ix, I32)
33 PERLVAR(Tscopestack_max,I32)
35 PERLVAR(Tsavestack, ANY *) /* items that need to be restored
36 when LEAVEing scopes we've ENTERed */
37 PERLVAR(Tsavestack_ix, I32)
38 PERLVAR(Tsavestack_max, I32)
40 PERLVAR(Ttmps_stack, SV **) /* mortals we've made */
41 PERLVARI(Ttmps_ix, I32, -1)
42 PERLVARI(Ttmps_floor, I32, -1)
43 PERLVAR(Ttmps_max, I32)
45 PERLVAR(Tmarkstack, I32 *) /* stack_sp locations we're remembering */
46 PERLVAR(Tmarkstack_ptr, I32 *)
47 PERLVAR(Tmarkstack_max, I32 *)
49 PERLVAR(Tretstack, OP **) /* OPs we have postponed executing */
50 PERLVAR(Tretstack_ix, I32)
51 PERLVAR(Tretstack_max, I32)
53 PERLVAR(TSv, SV *) /* used to hold temporary values */
54 PERLVAR(TXpv, XPV *) /* used to hold temporary values */
57 PERLVAR(Tstatbuf, Stat_t)
58 PERLVAR(Tstatcache, Stat_t) /* _ */
59 PERLVAR(Tstatgv, GV *)
60 PERLVARI(Tstatname, SV *, Nullsv)
63 PERLVAR(Ttimesbuf, struct tms)
66 /* Fields used by magic variables such as $@, $/ and so on */
67 PERLVAR(Ttainted, bool) /* using variables controlled by $< */
68 PERLVAR(Tcurpm, PMOP *) /* what to do \ interps in REs from */
70 PERLVAR(Trs, SV *) /* input record separator $/ */
71 PERLVAR(Tlast_in_gv, GV *) /* GV used in last <FH> */
72 PERLVAR(Tofs, char *) /* output field separator $, */
73 PERLVAR(Tofslen, STRLEN)
74 PERLVAR(Tdefoutgv, GV *) /* default FH for output */
75 PERLVARI(Tchopset, char *, " \n-") /* $: */
76 PERLVAR(Tformtarget, SV *)
77 PERLVAR(Tbodytarget, SV *)
78 PERLVAR(Ttoptarget, SV *)
81 PERLVAR(Tdefstash, HV *) /* main symbol table */
82 PERLVAR(Tcurstash, HV *) /* symbol table for current package */
84 PERLVAR(Trestartop, OP *) /* propagating an error from croak? */
85 PERLVARI(Tcurcop, COP * VOL, &compiling)
86 PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
87 PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
88 PERLVAR(Tdirty, bool) /* in the middle of tearing things down? */
89 PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
91 PERLVAR(Tcurstack, AV *) /* THE STACK */
92 PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
93 PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
94 PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
95 PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
97 /* statics "owned" by various functions */
98 PERLVAR(Tav_fetch_sv, SV *) /* owned by av_fetch() */
99 PERLVAR(Thv_fetch_sv, SV *) /* owned by hv_fetch() */
100 PERLVAR(Thv_fetch_ent_mh, HE) /* owned by hv_fetch_ent() */
102 PERLVAR(Tmodcount, I32) /* how much mod()ification in assignment? */
104 PERLVAR(Tlastgotoprobe, OP*) /* from pp_ctl.c */
107 PERLVAR(Tsortcop, OP *) /* user defined sort routine */
108 PERLVAR(Tsortstash, HV *) /* which is in some package or other */
109 PERLVAR(Tfirstgv, GV *) /* $a */
110 PERLVAR(Tsecondgv, GV *) /* $b */
111 PERLVAR(Tsortcxix, I32) /* from pp_ctl.c */
115 PERLVAR(Tscreamfirst, I32 *)
116 PERLVAR(Tscreamnext, I32 *)
117 PERLVARI(Tmaxscream, I32, -1)
118 PERLVAR(Tlastscream, SV *)
120 PERLVAR(Tregdummy, regnode) /* from regcomp.c */
121 PERLVAR(Tregcomp_parse, char*) /* Input-scan pointer. */
122 PERLVAR(Tregxend, char*) /* End of input for compile */
123 PERLVAR(Tregcode, regnode*) /* Code-emit pointer; ®dummy = don't */
124 PERLVAR(Tregnaughty, I32) /* How bad is this pattern? */
125 PERLVAR(Tregsawback, I32) /* Did we see \1, ...? */
126 PERLVAR(Tregprecomp, char *) /* uncompiled string. */
127 PERLVAR(Tregnpar, I32) /* () count. */
128 PERLVAR(Tregsize, I32) /* Code size. */
129 PERLVAR(Tregflags, U16) /* are we folding, multilining? */
130 PERLVAR(Tregseen, U32) /* from regcomp.c */
131 PERLVAR(Tseen_zerolen, I32) /* from regcomp.c */
132 PERLVAR(Tseen_evals, I32) /* from regcomp.c */
133 PERLVAR(Tregcomp_rx, regexp *) /* from regcomp.c */
134 PERLVAR(Textralen, I32) /* from regcomp.c */
135 PERLVAR(Tcolorset, int) /* from regcomp.c */
136 PERLVAR(Tcolors[4], char *) /* from regcomp.c */
137 PERLVAR(Treginput, char *) /* String-input pointer. */
138 PERLVAR(Tregbol, char *) /* Beginning of input, for ^ check. */
139 PERLVAR(Tregeol, char *) /* End of input, for $ check. */
140 PERLVAR(Tregstartp, char **) /* Pointer to startp array. */
141 PERLVAR(Tregendp, char **) /* Ditto for endp. */
142 PERLVAR(Treglastparen, U32 *) /* Similarly for lastparen. */
143 PERLVAR(Tregtill, char *) /* How far we are required to go. */
144 PERLVAR(Tregprev, char) /* char before regbol, \n if none */
145 PERLVAR(Treg_start_tmp, char **) /* from regexec.c */
146 PERLVAR(Treg_start_tmpl,U32) /* from regexec.c */
147 PERLVAR(Tregdata, struct reg_data *)
148 /* from regexec.c renamed was data */
149 PERLVAR(Tbostr, char *) /* from regexec.c */
150 PERLVAR(Treg_flags, U32) /* from regexec.c */
151 PERLVAR(Treg_eval_set, I32) /* from regexec.c */
152 PERLVAR(Tregnarrate, I32) /* from regexec.c */
153 PERLVAR(Tregprogram, regnode *) /* from regexec.c */
154 PERLVARI(Tregindent, int, 0) /* from regexec.c */
155 PERLVAR(Tregcc, CURCUR *) /* from regexec.c */
157 PERLVARI(Tregcompp, regcomp_t, FUNC_NAME_TO_PTR(pregcomp))
158 /* Pointer to RE compiler */
159 PERLVARI(Tregexecp, regexec_t, FUNC_NAME_TO_PTR(regexec_flags))
160 /* Pointer to RE executer */
161 PERLVARI(Treginterp_cnt,int, 0) /* Whether `Regexp'
165 /* Note that the variables below are all explicitly referenced in the code
166 * as thr->whatever and therefore don't need the 'T' prefix. */
171 PERLVAR(cvcache, HV *)
172 PERLVAR(self, perl_os_thread) /* Underlying thread object */
174 PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
175 PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
176 PERLVAR(specific, AV *) /* Thread-specific user data */
177 PERLVAR(errsv, SV *) /* Backing SV for $@ */
178 PERLVAR(errhv, HV *) /* HV for what was %@ in pp_ctl.c */
179 PERLVAR(mutex, perl_mutex) /* For the fields others can change */
181 PERLVAR(prev, struct perl_thread *)
182 PERLVAR(next, struct perl_thread *)
183 /* Circular linked list of threads */
185 #ifdef HAVE_THREAD_INTERN
186 PERLVAR(i, struct thread_intern)
187 /* Platform-dependent internals */
190 PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
192 #endif /* USE_THREADS */