Commit | Line | Data |
---|---|---|
8b3be1d1 JP |
1 | /* Don't forget to re-run embed.pl to propagate changes! */ |
2 | ||
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.) */ | |
7 | ||
49f531da | 8 | /* Important ones in the first cache line (if alignment is done right) */ |
d4cce5f1 | 9 | |
49f531da NIS |
10 | PERLVAR(Tstack_sp, SV **) |
11 | #ifdef OP_IN_REGISTER | |
12 | PERLVAR(Topsave, OP *) | |
13 | #else | |
14 | PERLVAR(Top, OP *) | |
15 | #endif | |
16 | PERLVAR(Tcurpad, SV **) | |
49f531da | 17 | |
d4cce5f1 | 18 | PERLVAR(Tstack_base, SV **) |
49f531da NIS |
19 | PERLVAR(Tstack_max, SV **) |
20 | ||
21 | PERLVAR(Tscopestack, I32 *) | |
22 | PERLVAR(Tscopestack_ix, I32) | |
23 | PERLVAR(Tscopestack_max,I32) | |
24 | ||
25 | PERLVAR(Tsavestack, ANY *) | |
26 | PERLVAR(Tsavestack_ix, I32) | |
27 | PERLVAR(Tsavestack_max, I32) | |
28 | ||
29 | PERLVAR(Tretstack, OP **) | |
30 | PERLVAR(Tretstack_ix, I32) | |
31 | PERLVAR(Tretstack_max, I32) | |
32 | ||
33 | PERLVAR(Tmarkstack, I32 *) | |
34 | PERLVAR(Tmarkstack_ptr, I32 *) | |
35 | PERLVAR(Tmarkstack_max, I32 *) | |
36 | ||
d4cce5f1 NIS |
37 | PERLVAR(TSv, SV *) |
38 | PERLVAR(TXpv, XPV *) | |
61bb5906 | 39 | PERLVAR(Tstatbuf, Stat_t) |
49f531da NIS |
40 | #ifdef HAS_TIMES |
41 | PERLVAR(Ttimesbuf, struct tms) | |
42 | #endif | |
43 | ||
49f531da NIS |
44 | /* Now the fields that used to be "per interpreter" (even when global) */ |
45 | ||
46 | /* Fields used by magic variables such as $@, $/ and so on */ | |
d4cce5f1 NIS |
47 | PERLVAR(Ttainted, bool) /* using variables controlled by $< */ |
48 | PERLVAR(Tcurpm, PMOP *) /* what to do \ interps from */ | |
49f531da | 49 | PERLVAR(Tnrs, SV *) |
d4cce5f1 | 50 | PERLVAR(Trs, SV *) /* $/ */ |
49f531da | 51 | PERLVAR(Tlast_in_gv, GV *) |
d4cce5f1 | 52 | PERLVAR(Tofs, char *) /* $, */ |
49f531da NIS |
53 | PERLVAR(Tofslen, STRLEN) |
54 | PERLVAR(Tdefoutgv, GV *) | |
d4cce5f1 | 55 | PERLVARI(Tchopset, char *, " \n-") /* $: */ |
49f531da NIS |
56 | PERLVAR(Tformtarget, SV *) |
57 | PERLVAR(Tbodytarget, SV *) | |
58 | PERLVAR(Ttoptarget, SV *) | |
59 | ||
d4cce5f1 NIS |
60 | /* Stashes */ |
61 | PERLVAR(Tdefstash, HV *) /* main symbol table */ | |
62 | PERLVAR(Tcurstash, HV *) /* symbol table for current package */ | |
49f531da | 63 | |
d4cce5f1 | 64 | /* Stacks */ |
49f531da | 65 | PERLVAR(Ttmps_stack, SV **) |
d4cce5f1 NIS |
66 | PERLVARI(Ttmps_ix, I32, -1) |
67 | PERLVARI(Ttmps_floor, I32, -1) | |
49f531da NIS |
68 | PERLVAR(Ttmps_max, I32) |
69 | ||
d4cce5f1 NIS |
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? */ | |
61bb5906 | 75 | PERLVAR(Tlocalizing, int) /* are we processing a local() list? */ |
49f531da | 76 | |
d4cce5f1 | 77 | PERLVAR(Tcurstack, AV *) /* THE STACK */ |
e336de0d | 78 | PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */ |
d4cce5f1 NIS |
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 */ | |
49f531da | 82 | |
4e4c362e GS |
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) | |
8b3be1d1 | 87 | PERLVAR(Tmodcount, I32) |
4e4c362e | 88 | |
49f531da | 89 | /* XXX Sort stuff, firstgv secongv and so on? */ |
d4cce5f1 NIS |
90 | /* XXX What about regexp stuff? */ |
91 | ||
8b3be1d1 JP |
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. */ | |
94 | ||
d4cce5f1 | 95 | #ifdef USE_THREADS |
49f531da NIS |
96 | |
97 | PERLVAR(oursv, SV *) | |
98 | PERLVAR(cvcache, HV *) | |
99 | PERLVAR(self, perl_os_thread) /* Underlying thread object */ | |
100 | PERLVAR(flags, U32) | |
101 | PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */ | |
940cb80d | 102 | PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */ |
49f531da NIS |
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 */ | |
107 | PERLVAR(tid, U32) | |
108 | PERLVAR(prev, struct perl_thread *) | |
109 | PERLVAR(next, struct perl_thread *) /* Circular linked list of threads */ | |
110 | ||
111 | #ifdef HAVE_THREAD_INTERN | |
112 | PERLVAR(i, struct thread_intern) /* Platform-dependent internals */ | |
113 | #endif | |
114 | ||
115 | PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */ | |
116 | ||
d4cce5f1 | 117 | #endif /* USE_THREADS */ |