This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[win32] fix order of init
[perl5.git] / thrdvar.h
CommitLineData
49f531da
NIS
1/* Per-thread variables */
2/* Important ones in the first cache line (if alignment is done right) */
d4cce5f1 3
49f531da
NIS
4PERLVAR(Tstack_sp, SV **)
5#ifdef OP_IN_REGISTER
6PERLVAR(Topsave, OP *)
7#else
8PERLVAR(Top, OP *)
9#endif
10PERLVAR(Tcurpad, SV **)
49f531da 11
d4cce5f1 12PERLVAR(Tstack_base, SV **)
49f531da
NIS
13PERLVAR(Tstack_max, SV **)
14
15PERLVAR(Tscopestack, I32 *)
16PERLVAR(Tscopestack_ix, I32)
17PERLVAR(Tscopestack_max,I32)
18
19PERLVAR(Tsavestack, ANY *)
20PERLVAR(Tsavestack_ix, I32)
21PERLVAR(Tsavestack_max, I32)
22
23PERLVAR(Tretstack, OP **)
24PERLVAR(Tretstack_ix, I32)
25PERLVAR(Tretstack_max, I32)
26
27PERLVAR(Tmarkstack, I32 *)
28PERLVAR(Tmarkstack_ptr, I32 *)
29PERLVAR(Tmarkstack_max, I32 *)
30
d4cce5f1
NIS
31PERLVAR(TSv, SV *)
32PERLVAR(TXpv, XPV *)
61bb5906 33PERLVAR(Tstatbuf, Stat_t)
49f531da
NIS
34#ifdef HAS_TIMES
35PERLVAR(Ttimesbuf, struct tms)
36#endif
37
49f531da
NIS
38/* Now the fields that used to be "per interpreter" (even when global) */
39
40/* Fields used by magic variables such as $@, $/ and so on */
d4cce5f1
NIS
41PERLVAR(Ttainted, bool) /* using variables controlled by $< */
42PERLVAR(Tcurpm, PMOP *) /* what to do \ interps from */
49f531da 43PERLVAR(Tnrs, SV *)
d4cce5f1 44PERLVAR(Trs, SV *) /* $/ */
49f531da 45PERLVAR(Tlast_in_gv, GV *)
d4cce5f1 46PERLVAR(Tofs, char *) /* $, */
49f531da
NIS
47PERLVAR(Tofslen, STRLEN)
48PERLVAR(Tdefoutgv, GV *)
d4cce5f1 49PERLVARI(Tchopset, char *, " \n-") /* $: */
49f531da
NIS
50PERLVAR(Tformtarget, SV *)
51PERLVAR(Tbodytarget, SV *)
52PERLVAR(Ttoptarget, SV *)
53
d4cce5f1
NIS
54/* Stashes */
55PERLVAR(Tdefstash, HV *) /* main symbol table */
56PERLVAR(Tcurstash, HV *) /* symbol table for current package */
49f531da 57
d4cce5f1 58/* Stacks */
49f531da 59PERLVAR(Ttmps_stack, SV **)
d4cce5f1
NIS
60PERLVARI(Ttmps_ix, I32, -1)
61PERLVARI(Ttmps_floor, I32, -1)
49f531da
NIS
62PERLVAR(Ttmps_max, I32)
63
d4cce5f1
NIS
64PERLVAR(Trestartop, OP *) /* Are we propagating an error from croak? */
65PERLVARI(Tcurcop, COP * VOL, &compiling)
66PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
67PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
68PERLVAR(Tdirty, bool) /* In the middle of tearing things down? */
61bb5906 69PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
49f531da 70
d4cce5f1 71PERLVAR(Tcurstack, AV *) /* THE STACK */
e336de0d 72PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
d4cce5f1
NIS
73PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
74PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
75PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
49f531da 76
4e4c362e
GS
77/* statics "owned" by various functions */
78PERLVAR(Tav_fetch_sv, SV *)
79PERLVAR(Thv_fetch_sv, SV *)
80PERLVAR(Thv_fetch_ent_mh, HE)
81
49f531da 82/* XXX Sort stuff, firstgv secongv and so on? */
d4cce5f1
NIS
83/* XXX What about regexp stuff? */
84
85#ifdef USE_THREADS
49f531da
NIS
86
87PERLVAR(oursv, SV *)
88PERLVAR(cvcache, HV *)
89PERLVAR(self, perl_os_thread) /* Underlying thread object */
90PERLVAR(flags, U32)
91PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
940cb80d 92PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
49f531da
NIS
93PERLVAR(specific, AV *) /* Thread-specific user data */
94PERLVAR(errsv, SV *) /* Backing SV for $@ */
95PERLVAR(errhv, HV *) /* HV for what was %@ in pp_ctl.c */
96PERLVAR(mutex, perl_mutex) /* For the fields others can change */
97PERLVAR(tid, U32)
98PERLVAR(prev, struct perl_thread *)
99PERLVAR(next, struct perl_thread *) /* Circular linked list of threads */
100
101#ifdef HAVE_THREAD_INTERN
102PERLVAR(i, struct thread_intern) /* Platform-dependent internals */
103#endif
104
105PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
106
d4cce5f1 107#endif /* USE_THREADS */