Commit | Line | Data |
eb1102fc |
1 | /* perlvars.h |
2 | * |
3 | * Copyright (c) 1997-2002, Larry Wall |
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 |
10 | /****************/ |
11 | /* Truly global */ |
12 | /****************/ |
13 | |
cb68f92d |
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 |
26 | PERLVAR(Gcurinterp, PerlInterpreter *) |
43165c05 |
27 | /* currently running interpreter |
ba869deb |
28 | * (initial parent interpreter under |
29 | * useithreads) */ |
4d1ff10f |
30 | #if defined(USE_5005THREADS) || defined(USE_ITHREADS) |
ba869deb |
31 | PERLVAR(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 |
35 | PERLVARIC(GYes, char *, "1") |
36 | PERLVARIC(GNo, char *, "") |
e3fdf988 |
37 | PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEF") |
3fe6f2dc |
38 | PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}") |
43165c05 |
39 | |
40 | /* XXX does anyone even use this? */ |
41 | PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */ |
b363f7ed |
42 | |
4d1ff10f |
43 | #if defined(MYMALLOC) && (defined(USE_5005THREADS) || defined(USE_ITHREADS)) |
b363f7ed |
44 | PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */ |
45 | #endif |
534825c4 |
46 | |
47 | #if defined(USE_ITHREADS) |
48 | PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */ |
49 | #endif |
60e4ec2e |
50 | |
51 | /* Force inclusion of both runops options */ |
52 | PERLVARI(Grunops_std, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_standard)) |
53 | PERLVARI(Grunops_dbg, runops_proc_t, MEMBER_TO_FPTR(Perl_runops_debug)) |
54 | |
68795e93 |
55 | /* Hooks to shared SVs and locks. */ |
56 | PERLVARI(Gsharehook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing)) |
57 | PERLVARI(Glockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nolocking)) |
58 | PERLVARI(Gunlockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nounlocking)) |
62375a60 |
59 | PERLVARI(Gthreadhook, thrhook_proc_t, MEMBER_TO_FPTR(Perl_nothreadhook)) |
68795e93 |
60 | |
4d76a344 |
61 | /* Stores the PPID */ |
62 | #ifdef THREADS_HAVE_PIDS |
63 | PERLVARI(Gppid, IV, 0) |
64 | #endif |