Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
9.6 KiB

  1. /***********************************************/
  2. /* Global only to current thread */
  3. /***********************************************/
  4. /* Don't forget to re-run embed.pl to propagate changes! */
  5. /* The 'T' prefix is only needed for vars that need appropriate #defines
  6. * generated when built with or without USE_THREADS. It is also used
  7. * to generate the appropriate export list for win32.
  8. *
  9. * When building without USE_THREADS, these variables will be truly global.
  10. * When building without USE_THREADS but with MULTIPLICITY, these variables
  11. * will be global per-interpreter. */
  12. /* Important ones in the first cache line (if alignment is done right) */
  13. #ifdef USE_THREADS
  14. PERLVAR(interp, PerlInterpreter*) /* thread owner */
  15. #endif
  16. PERLVAR(Tstack_sp, SV **) /* top of the stack */
  17. #ifdef OP_IN_REGISTER
  18. PERLVAR(Topsave, OP *)
  19. #else
  20. PERLVAR(Top, OP *) /* currently executing op */
  21. #endif
  22. PERLVAR(Tcurpad, SV **) /* active pad (lexicals+tmps) */
  23. PERLVAR(Tstack_base, SV **)
  24. PERLVAR(Tstack_max, SV **)
  25. PERLVAR(Tscopestack, I32 *) /* scopes we've ENTERed */
  26. PERLVAR(Tscopestack_ix, I32)
  27. PERLVAR(Tscopestack_max,I32)
  28. PERLVAR(Tsavestack, ANY *) /* items that need to be restored
  29. when LEAVEing scopes we've ENTERed */
  30. PERLVAR(Tsavestack_ix, I32)
  31. PERLVAR(Tsavestack_max, I32)
  32. PERLVAR(Ttmps_stack, SV **) /* mortals we've made */
  33. PERLVARI(Ttmps_ix, I32, -1)
  34. PERLVARI(Ttmps_floor, I32, -1)
  35. PERLVAR(Ttmps_max, I32)
  36. PERLVAR(Tmarkstack, I32 *) /* stack_sp locations we're remembering */
  37. PERLVAR(Tmarkstack_ptr, I32 *)
  38. PERLVAR(Tmarkstack_max, I32 *)
  39. PERLVAR(Tretstack, OP **) /* OPs we have postponed executing */
  40. PERLVAR(Tretstack_ix, I32)
  41. PERLVAR(Tretstack_max, I32)
  42. PERLVAR(TSv, SV *) /* used to hold temporary values */
  43. PERLVAR(TXpv, XPV *) /* used to hold temporary values */
  44. /*
  45. =for apidoc Amn|STRLEN|PL_na
  46. A convenience variable which is typically used with C<SvPV> when one
  47. doesn't care about the length of the string. It is usually more efficient
  48. to either declare a local variable and use that instead or to use the
  49. C<SvPV_nolen> macro.
  50. =cut
  51. */
  52. PERLVAR(Tna, STRLEN) /* for use in SvPV when length is
  53. Not Applicable */
  54. /* stat stuff */
  55. PERLVAR(Tstatbuf, Stat_t)
  56. PERLVAR(Tstatcache, Stat_t) /* _ */
  57. PERLVAR(Tstatgv, GV *)
  58. PERLVARI(Tstatname, SV *, Nullsv)
  59. #ifdef HAS_TIMES
  60. PERLVAR(Ttimesbuf, struct tms)
  61. #endif
  62. /* Fields used by magic variables such as $@, $/ and so on */
  63. PERLVAR(Ttainted, bool) /* using variables controlled by $< */
  64. PERLVAR(Tcurpm, PMOP *) /* what to do \ interps in REs from */
  65. PERLVAR(Tnrs, SV *)
  66. /*
  67. =for apidoc mn|SV*|PL_rs
  68. The input record separator - C<$/> in Perl space.
  69. =for apidoc mn|GV*|PL_last_in_gv
  70. The GV which was last used for a filehandle input operation. (C<< <FH> >>)
  71. =for apidoc mn|SV*|PL_ofs_sv
  72. The output field separator - C<$,> in Perl space.
  73. =cut
  74. */
  75. PERLVAR(Trs, SV *) /* input record separator $/ */
  76. PERLVAR(Tlast_in_gv, GV *) /* GV used in last <FH> */
  77. PERLVAR(Tofs, char *) /* output field separator $, */
  78. PERLVAR(Tofslen, STRLEN)
  79. PERLVAR(Tdefoutgv, GV *) /* default FH for output */
  80. PERLVARI(Tchopset, char *, " \n-") /* $: */
  81. PERLVAR(Tformtarget, SV *)
  82. PERLVAR(Tbodytarget, SV *)
  83. PERLVAR(Ttoptarget, SV *)
  84. /* Stashes */
  85. PERLVAR(Tdefstash, HV *) /* main symbol table */
  86. PERLVAR(Tcurstash, HV *) /* symbol table for current package */
  87. PERLVAR(Trestartop, OP *) /* propagating an error from croak? */
  88. PERLVARI(Tcurcop, COP * VOL, &PL_compiling)
  89. PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
  90. PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
  91. PERLVARI(Tdirty, bool, FALSE) /* in the middle of tearing things down? */
  92. PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
  93. PERLVAR(Tcurstack, AV *) /* THE STACK */
  94. PERLVAR(Tcurstackinfo, PERL_SI *) /* current stack + context */
  95. PERLVAR(Tmainstack, AV *) /* the stack when nothing funny is happening */
  96. PERLVAR(Ttop_env, JMPENV *) /* ptr. to current sigjmp() environment */
  97. PERLVAR(Tstart_env, JMPENV) /* empty startup sigjmp() environment */
  98. #ifdef PERL_FLEXIBLE_EXCEPTIONS
  99. PERLVARI(Tprotect, protect_proc_t, MEMBER_TO_FPTR(Perl_default_protect))
  100. #endif
  101. PERLVARI(Terrors, SV *, Nullsv) /* outstanding queued errors */
  102. /* statics "owned" by various functions */
  103. PERLVAR(Tav_fetch_sv, SV *) /* owned by av_fetch() */
  104. PERLVAR(Thv_fetch_sv, SV *) /* owned by hv_fetch() */
  105. PERLVAR(Thv_fetch_ent_mh, HE) /* owned by hv_fetch_ent() */
  106. PERLVAR(Tmodcount, I32) /* how much mod()ification in assignment? */
  107. PERLVAR(Tlastgotoprobe, OP*) /* from pp_ctl.c */
  108. PERLVARI(Tdumpindent, I32, 4) /* # of blanks per dump indentation level */
  109. /* sort stuff */
  110. PERLVAR(Tsortcop, OP *) /* user defined sort routine */
  111. PERLVAR(Tsortstash, HV *) /* which is in some package or other */
  112. PERLVAR(Tfirstgv, GV *) /* $a */
  113. PERLVAR(Tsecondgv, GV *) /* $b */
  114. PERLVAR(Tsortcxix, I32) /* from pp_ctl.c */
  115. /* float buffer */
  116. PERLVAR(Tefloatbuf, char*)
  117. PERLVAR(Tefloatsize, STRLEN)
  118. /* regex stuff */
  119. PERLVAR(Tscreamfirst, I32 *)
  120. PERLVAR(Tscreamnext, I32 *)
  121. PERLVARI(Tmaxscream, I32, -1)
  122. PERLVAR(Tlastscream, SV *)
  123. PERLVAR(Tregdummy, regnode) /* from regcomp.c */
  124. PERLVAR(Tregcomp_parse, char*) /* Input-scan pointer. */
  125. PERLVAR(Tregxend, char*) /* End of input for compile */
  126. PERLVAR(Tregcode, regnode*) /* Code-emit pointer; &regdummy = don't */
  127. PERLVAR(Tregnaughty, I32) /* How bad is this pattern? */
  128. PERLVAR(Tregsawback, I32) /* Did we see \1, ...? */
  129. PERLVAR(Tregprecomp, char *) /* uncompiled string. */
  130. PERLVAR(Tregnpar, I32) /* () count. */
  131. PERLVAR(Tregsize, I32) /* Code size. */
  132. PERLVAR(Tregflags, U16) /* are we folding, multilining? */
  133. PERLVAR(Tregseen, U32) /* from regcomp.c */
  134. PERLVAR(Tseen_zerolen, I32) /* from regcomp.c */
  135. PERLVAR(Tseen_evals, I32) /* from regcomp.c */
  136. PERLVAR(Tregcomp_rx, regexp *) /* from regcomp.c */
  137. PERLVAR(Textralen, I32) /* from regcomp.c */
  138. PERLVAR(Tcolorset, int) /* from regcomp.c */
  139. PERLVARA(Tcolors,6, char *) /* from regcomp.c */
  140. PERLVAR(Treg_whilem_seen, I32) /* number of WHILEM in this expr */
  141. PERLVAR(Treginput, char *) /* String-input pointer. */
  142. PERLVAR(Tregbol, char *) /* Beginning of input, for ^ check. */
  143. PERLVAR(Tregeol, char *) /* End of input, for $ check. */
  144. PERLVAR(Tregstartp, I32 *) /* Pointer to startp array. */
  145. PERLVAR(Tregendp, I32 *) /* Ditto for endp. */
  146. PERLVAR(Treglastparen, U32 *) /* Similarly for lastparen. */
  147. PERLVAR(Tregtill, char *) /* How far we are required to go. */
  148. PERLVAR(Tregprev, char) /* char before regbol, \n if none */
  149. PERLVAR(Treg_start_tmp, char **) /* from regexec.c */
  150. PERLVAR(Treg_start_tmpl,U32) /* from regexec.c */
  151. PERLVAR(Tregdata, struct reg_data *)
  152. /* from regexec.c renamed was data */
  153. PERLVAR(Tbostr, char *) /* from regexec.c */
  154. PERLVAR(Treg_flags, U32) /* from regexec.c */
  155. PERLVAR(Treg_eval_set, I32) /* from regexec.c */
  156. PERLVAR(Tregnarrate, I32) /* from regexec.c */
  157. PERLVAR(Tregprogram, regnode *) /* from regexec.c */
  158. PERLVARI(Tregindent, int, 0) /* from regexec.c */
  159. PERLVAR(Tregcc, CURCUR *) /* from regexec.c */
  160. PERLVAR(Treg_call_cc, struct re_cc_state *) /* from regexec.c */
  161. PERLVAR(Treg_re, regexp *) /* from regexec.c */
  162. PERLVAR(Treg_ganch, char *) /* position of \G */
  163. PERLVAR(Treg_sv, SV *) /* what we match against */
  164. PERLVAR(Treg_magic, MAGIC *) /* pos-magic of what we match */
  165. PERLVAR(Treg_oldpos, I32) /* old pos of what we match */
  166. PERLVARI(Treg_oldcurpm, PMOP*, NULL) /* curpm before match */
  167. PERLVARI(Treg_curpm, PMOP*, NULL) /* curpm during match */
  168. PERLVAR(Treg_oldsaved, char*) /* old saved substr during match */
  169. PERLVAR(Treg_oldsavedlen, STRLEN) /* old length of saved substr during match */
  170. PERLVAR(Treg_maxiter, I32) /* max wait until caching pos */
  171. PERLVAR(Treg_leftiter, I32) /* wait until caching pos */
  172. PERLVARI(Treg_poscache, char *, Nullch) /* cache of pos of WHILEM */
  173. PERLVAR(Treg_poscache_size, STRLEN) /* size of pos cache of WHILEM */
  174. PERLVARI(Tregcompp, regcomp_t, MEMBER_TO_FPTR(Perl_pregcomp))
  175. /* Pointer to REx compiler */
  176. PERLVARI(Tregexecp, regexec_t, MEMBER_TO_FPTR(Perl_regexec_flags))
  177. /* Pointer to REx executer */
  178. PERLVARI(Tregint_start, re_intuit_start_t, MEMBER_TO_FPTR(Perl_re_intuit_start))
  179. /* Pointer to optimized REx executer */
  180. PERLVARI(Tregint_string,re_intuit_string_t, MEMBER_TO_FPTR(Perl_re_intuit_string))
  181. /* Pointer to optimized REx string */
  182. PERLVARI(Tregfree, regfree_t, MEMBER_TO_FPTR(Perl_pregfree))
  183. /* Pointer to REx free()er */
  184. PERLVARI(Treginterp_cnt,int, 0) /* Whether `Regexp'
  185. was interpolated. */
  186. PERLVARI(Treg_starttry, char *, 0) /* -Dr: where regtry was called. */
  187. PERLVARI(Twatchaddr, char **, 0)
  188. PERLVAR(Twatchok, char *)
  189. /* Note that the variables below are all explicitly referenced in the code
  190. * as thr->whatever and therefore don't need the 'T' prefix. */
  191. #ifdef USE_THREADS
  192. PERLVAR(oursv, SV *)
  193. PERLVAR(cvcache, HV *)
  194. PERLVAR(self, perl_os_thread) /* Underlying thread object */
  195. PERLVAR(flags, U32)
  196. PERLVAR(threadsv, AV *) /* Per-thread SVs ($_, $@ etc.) */
  197. PERLVAR(threadsvp, SV **) /* AvARRAY(threadsv) */
  198. PERLVAR(specific, AV *) /* Thread-specific user data */
  199. PERLVAR(errsv, SV *) /* Backing SV for $@ */
  200. PERLVAR(mutex, perl_mutex) /* For the fields others can change */
  201. PERLVAR(tid, U32)
  202. PERLVAR(prev, struct perl_thread *)
  203. PERLVAR(next, struct perl_thread *)
  204. /* Circular linked list of threads */
  205. #ifdef HAVE_THREAD_INTERN
  206. PERLVAR(i, struct thread_intern)
  207. /* Platform-dependent internals */
  208. #endif
  209. PERLVAR(trailing_nul, char) /* For the sake of thrsv and oursv */
  210. #endif /* USE_THREADS */