1 /* Don't forget to re-run embed.pl to propagate changes! */
3 /* Per-thread variables
4 The 'T' prefix is only needed for vars that need appropriate #defines
5 generated when built with or without USE_THREADS. (It is also used
6 to generate the appropriate the export list for win32.) */
8 /* Important ones in the first cache line (if alignment is done right) */
10 PERLVAR(Tstack_sp, SV **)
12 PERLVAR(Topsave, OP *)
16 PERLVAR(Tcurpad, SV **)
18 PERLVAR(Tstack_base, SV **)
19 PERLVAR(Tstack_max, SV **)
21 PERLVAR(Tscopestack, I32 *)
22 PERLVAR(Tscopestack_ix, I32)
23 PERLVAR(Tscopestack_max,I32)
25 PERLVAR(Tsavestack, ANY *)
26 PERLVAR(Tsavestack_ix, I32)
27 PERLVAR(Tsavestack_max, I32)
29 PERLVAR(Tretstack, OP **)
30 PERLVAR(Tretstack_ix, I32)
31 PERLVAR(Tretstack_max, I32)
33 PERLVAR(Tmarkstack, I32 *)
34 PERLVAR(Tmarkstack_ptr, I32 *)
35 PERLVAR(Tmarkstack_max, I32 *)
39 PERLVAR(Tstatbuf, Stat_t)
41 PERLVAR(Ttimesbuf, struct tms)
44 /* Now the fields that used to be "per interpreter" (even when global) */
46 /* Fields used by magic variables such as $@, $/ and so on */
47 PERLVAR(Ttainted, bool) /* using variables controlled by $< */
48 PERLVAR(Tcurpm, PMOP *) /* what to do \ interps from */
50 PERLVAR(Trs, SV *) /* $/ */
51 PERLVAR(Tlast_in_gv, GV *)
52 PERLVAR(Tofs, char *) /* $, */
53 PERLVAR(Tofslen, STRLEN)
54 PERLVAR(Tdefoutgv, GV *)
55 PERLVARI(Tchopset, char *, " \n-") /* $: */
56 PERLVAR(Tformtarget, SV *)
57 PERLVAR(Tbodytarget, SV *)
58 PERLVAR(Ttoptarget, SV *)
61 PERLVAR(Tdefstash, HV *) /* main symbol table */
62 PERLVAR(Tcurstash, HV *) /* symbol table for current package */
65 PERLVAR(Ttmps_stack, SV **)
66 PERLVARI(Ttmps_ix, I32, -1)
67 PERLVARI(Ttmps_floor, I32, -1)
68 PERLVAR(Ttmps_max, I32)
70 PERLVAR(Trestartop, OP *) /* Are we propagating an error from croak? */
71 PERLVARI(Tcurcop, COP * VOL, &compiling)
72 PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
73 PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
74 PERLVAR(Tdirty, bool) /* In the middle of tearing things down? */
75 PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
77 PERLVAR(Tcurstack, AV *) /* THE STACK */
78 PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
79 PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
80 PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
81 PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
83 /* statics "owned" by various functions */
84 PERLVAR(Tav_fetch_sv, SV *)
85 PERLVAR(Thv_fetch_sv, SV *)
86 PERLVAR(Thv_fetch_ent_mh, HE)
87 PERLVAR(Tmodcount, I32)
89 /* XXX Sort stuff, firstgv secongv and so on? */
90 /* XXX What about regexp stuff? */
92 /* Note that the variables below are all explicitly referenced in the code
93 as thr->whatever and therefore don't need the 'T' prefix. */
98 PERLVAR(cvcache, HV *)
99 PERLVAR(self, perl_os_thread) /* Underlying thread object */
101 PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
102 PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
103 PERLVAR(specific, AV *) /* Thread-specific user data */
104 PERLVAR(errsv, SV *) /* Backing SV for $@ */
105 PERLVAR(errhv, HV *) /* HV for what was %@ in pp_ctl.c */
106 PERLVAR(mutex, perl_mutex) /* For the fields others can change */
108 PERLVAR(prev, struct perl_thread *)
109 PERLVAR(next, struct perl_thread *) /* Circular linked list of threads */
111 #ifdef HAVE_THREAD_INTERN
112 PERLVAR(i, struct thread_intern) /* Platform-dependent internals */
115 PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
117 #endif /* USE_THREADS */