Re: Exceptions in IPC::Open2
[p5sagit/p5-mst-13.2.git] / thrdvar.h
CommitLineData
8b3be1d1 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
5generated when built with or without USE_THREADS. (It is also used
6to 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 10PERLVAR(Tstack_sp, SV **)
11#ifdef OP_IN_REGISTER
12PERLVAR(Topsave, OP *)
13#else
14PERLVAR(Top, OP *)
15#endif
16PERLVAR(Tcurpad, SV **)
49f531da 17
d4cce5f1 18PERLVAR(Tstack_base, SV **)
49f531da 19PERLVAR(Tstack_max, SV **)
20
21PERLVAR(Tscopestack, I32 *)
22PERLVAR(Tscopestack_ix, I32)
23PERLVAR(Tscopestack_max,I32)
24
25PERLVAR(Tsavestack, ANY *)
26PERLVAR(Tsavestack_ix, I32)
27PERLVAR(Tsavestack_max, I32)
28
29PERLVAR(Tretstack, OP **)
30PERLVAR(Tretstack_ix, I32)
31PERLVAR(Tretstack_max, I32)
32
33PERLVAR(Tmarkstack, I32 *)
34PERLVAR(Tmarkstack_ptr, I32 *)
35PERLVAR(Tmarkstack_max, I32 *)
36
d4cce5f1 37PERLVAR(TSv, SV *)
38PERLVAR(TXpv, XPV *)
61bb5906 39PERLVAR(Tstatbuf, Stat_t)
49f531da 40#ifdef HAS_TIMES
41PERLVAR(Ttimesbuf, struct tms)
42#endif
43
49f531da 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 47PERLVAR(Ttainted, bool) /* using variables controlled by $< */
48PERLVAR(Tcurpm, PMOP *) /* what to do \ interps from */
49f531da 49PERLVAR(Tnrs, SV *)
d4cce5f1 50PERLVAR(Trs, SV *) /* $/ */
49f531da 51PERLVAR(Tlast_in_gv, GV *)
d4cce5f1 52PERLVAR(Tofs, char *) /* $, */
49f531da 53PERLVAR(Tofslen, STRLEN)
54PERLVAR(Tdefoutgv, GV *)
d4cce5f1 55PERLVARI(Tchopset, char *, " \n-") /* $: */
49f531da 56PERLVAR(Tformtarget, SV *)
57PERLVAR(Tbodytarget, SV *)
58PERLVAR(Ttoptarget, SV *)
59
d4cce5f1 60/* Stashes */
61PERLVAR(Tdefstash, HV *) /* main symbol table */
62PERLVAR(Tcurstash, HV *) /* symbol table for current package */
49f531da 63
d4cce5f1 64/* Stacks */
49f531da 65PERLVAR(Ttmps_stack, SV **)
d4cce5f1 66PERLVARI(Ttmps_ix, I32, -1)
67PERLVARI(Ttmps_floor, I32, -1)
49f531da 68PERLVAR(Ttmps_max, I32)
69
d4cce5f1 70PERLVAR(Trestartop, OP *) /* Are we propagating an error from croak? */
71PERLVARI(Tcurcop, COP * VOL, &compiling)
72PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
73PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
74PERLVAR(Tdirty, bool) /* In the middle of tearing things down? */
61bb5906 75PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
49f531da 76
d4cce5f1 77PERLVAR(Tcurstack, AV *) /* THE STACK */
e336de0d 78PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
d4cce5f1 79PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
80PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
81PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
49f531da 82
4e4c362e 83/* statics "owned" by various functions */
84PERLVAR(Tav_fetch_sv, SV *)
85PERLVAR(Thv_fetch_sv, SV *)
86PERLVAR(Thv_fetch_ent_mh, HE)
8b3be1d1 87PERLVAR(Tmodcount, I32)
4e4c362e 88
49f531da 89/* XXX Sort stuff, firstgv secongv and so on? */
d4cce5f1 90/* XXX What about regexp stuff? */
91
8b3be1d1 92/* Note that the variables below are all explicitly referenced in the code
93as thr->whatever and therefore don't need the 'T' prefix. */
94
d4cce5f1 95#ifdef USE_THREADS
49f531da 96
97PERLVAR(oursv, SV *)
98PERLVAR(cvcache, HV *)
99PERLVAR(self, perl_os_thread) /* Underlying thread object */
100PERLVAR(flags, U32)
101PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
940cb80d 102PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
49f531da 103PERLVAR(specific, AV *) /* Thread-specific user data */
104PERLVAR(errsv, SV *) /* Backing SV for $@ */
105PERLVAR(errhv, HV *) /* HV for what was %@ in pp_ctl.c */
106PERLVAR(mutex, perl_mutex) /* For the fields others can change */
107PERLVAR(tid, U32)
108PERLVAR(prev, struct perl_thread *)
109PERLVAR(next, struct perl_thread *) /* Circular linked list of threads */
110
111#ifdef HAVE_THREAD_INTERN
112PERLVAR(i, struct thread_intern) /* Platform-dependent internals */
113#endif
114
115PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
116
d4cce5f1 117#endif /* USE_THREADS */