This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5db.pl POD cleanup
[perl5.git] / perlvars.h
CommitLineData
eb1102fc
NIS
1/* perlvars.h
2 *
4bb101f2 3 * Copyright (C) 1999, 2000, 2001, 2002, by Larry Wall and others
eb1102fc
NIS
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
49f531da
NIS
10/****************/
11/* Truly global */
12/****************/
13
cb68f92d
GS
14/* Don't forget to re-run embed.pl to propagate changes! */
15
16/* This file describes the "global" variables used by perl
17 * This used to be in perl.h directly but we want to abstract out into
18 * distinct files which are per-thread, per-interpreter or really global,
19 * and how they're initialized.
20 *
21 * The 'G' prefix is only needed for vars that need appropriate #defines
22c35a8c 22 * generated in embed*.h. Such symbols are also used to generate
14dd3ad8 23 * the appropriate export list for win32. */
cb68f92d 24
49f531da 25/* global state */
cb68f92d 26PERLVAR(Gcurinterp, PerlInterpreter *)
43165c05 27 /* currently running interpreter
ba869deb
GS
28 * (initial parent interpreter under
29 * useithreads) */
3db8f154 30#if defined(USE_ITHREADS)
ba869deb
GS
31PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */
32#endif
a0ed51b3 33
3fe35a81 34/* constants (these are not literals to facilitate pointer comparisons) */
3fe6f2dc
MB
35PERLVARIC(GYes, char *, "1")
36PERLVARIC(GNo, char *, "")
e3fdf988 37PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEF")
3fe6f2dc 38PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
43165c05
GS
39
40/* XXX does anyone even use this? */
41PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */
b363f7ed 42
3db8f154 43#if defined(MYMALLOC) && defined(USE_ITHREADS)
b363f7ed
GS
44PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
45#endif
534825c4
GS
46
47#if defined(USE_ITHREADS)
48PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */
49#endif
60e4ec2e 50
d90a703e
JH
51#ifdef USE_ITHREADS
52PERLVAR(Gdollarzero_mutex, perl_mutex) /* Modifying $0 */
53#endif
5c728af0
IZ
54
55/* This is constant on most architectures, a global on OS/2 */
56PERLVARI(Gsh_path, char *, SH_PATH)/* full path of shell */
af419de7 57
2f42fcb0 58#ifndef PERL_MICRO
b35112e7
CS
59/* If Perl has to ignore SIGPFE, this is its saved state.
60 * See perl.h macros PERL_FPU_INIT and PERL_FPU_{PRE,POST}_EXEC. */
61PERLVAR(Gsigfpe_saved, Sighandler_t)
2f42fcb0 62#endif
b35112e7 63
643157af
JH
64/* Restricted hashes placeholder value.
65 * The contents are never used, only the address. */
66PERLVAR(Gsv_placeholder, SV)
67
2f42fcb0 68#ifndef PERL_MICRO
5c1546dc 69PERLVARI(Gcsighandlerp, Sighandler_t, &Perl_csighandler) /* Pointer to C-level sighandler */
2f42fcb0 70#endif
5c1546dc 71