YAP 7.1.0
h0globals.h
1
2 /* This file, hglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
3 please do not update, update H/GLOBALS instead */
4
5//
6// File defining fields in the Yap_GLOBAL global structure
7//
8// these fields used to spread all over the place, because they must be used in 3 ways:
9// - they must be defined somewhere
10// - they have an #ifdef to get a shorter name
11// - they must be initialised somewhere
12// - they may be of interest to restore
13//
14// The defs include 3+ components:
15// Type
16// name in structured / global name
17// init code (optional)
18// restore code (optional)
19//
20// Stuff that must be shared by all threads or workers
21
22// initialization: tell whether the system has been initialised and by whom.
23EXTERNAL int GLOBAL_Initialised;
24EXTERNAL int GLOBAL_InitialisedFromPL;
25EXTERNAL int GLOBAL_PL_Argc;
26EXTERNAL char** GLOBAL_PL_Argv;
27EXTERNAL bool GLOBAL_FAST_BOOT_FLAG;
28// halt hooks
29EXTERNAL struct halt_hook* GLOBAL_HaltHooks;
30EXTERNAL fptr_t GLOBAL_JIT_finalizer;
31// stack overflow expansion/gc control
32EXTERNAL int GLOBAL_AllowLocalExpansion;
33EXTERNAL int GLOBAL_AllowGlobalExpansion;
34EXTERNAL int GLOBAL_AllowTrailExpansion;
35EXTERNAL UInt GLOBAL_SizeOfOverflow;
36// amount of space recovered in all garbage collections
37EXTERNAL UInt GLOBAL_AGcThreshold;
38EXTERNAL Agc_hook GLOBAL_AGCHook;
39/* multi-thread support */
40#if THREADS
41/* number of threads and processes in system */
42EXTERNAL UInt GLOBAL_NOfThreads;
43/* number of threads created since start */
44EXTERNAL UInt GLOBAL_NOfThreadsCreated;
45/* total run time for dead threads */
46EXTERNAL UInt GLOBAL_ThreadsTotalTime;
47// Threads Array
48EXTERNAL lockvar GLOBAL_ThreadHandlesLock;
49#endif
50#if defined(YAPOR) || defined(THREADS)
51// protect long critical regions
52EXTERNAL lockvar GLOBAL_BGL;
53#endif
54#if defined(YAPOR) || defined(TABLING)
55EXTERNAL struct global_optyap_data GLOBAL_optyap_data;
56#endif /* YAPOR || TABLING */
57// whether Yap is responsible for signal handling
58EXTERNAL int GLOBAL_PrologShouldHandleInterrupts;
59/* This is the guy who actually started the system, and who has the correct registers */
60#if defined(THREADS)
61EXTERNAL pthread_t GLOBAL_master_thread;
62EXTERNAL struct thread_mbox* GLOBAL_named_mboxes;
63EXTERNAL lockvar GLOBAL_mboxq_lock;
64EXTERNAL UInt GLOBAL_mbox_count;
65EXTERNAL struct swi_mutex* GLOBAL_WithMutex;
66#endif /* THREADS */
67// streams
68EXTERNAL struct stream_desc* GLOBAL_Stream;
69#if defined(THREADS)||defined(YAPOR)
70EXTERNAL lockvar GLOBAL_StreamDescLock;
71#endif
72// access to yap initial arguments
73EXTERNAL char** GLOBAL_argv;
74EXTERNAL int GLOBAL_argc;
75// extensions to Terms
76#ifdef COROUTINING
77/* array with the ops for your favourite extensions */
78EXTERNAL ext_op GLOBAL_attas[attvars_ext+1];
79#endif
80// agc.c
81EXTERNAL int GLOBAL_agc_calls;
82EXTERNAL YAP_ULONG_LONG GLOBAL_agc_collected;
83/* total time spent in GC */
84EXTERNAL Int GLOBAL_tot_agc_time;
85/* number of heap objects in all garbage collections */
86EXTERNAL Int GLOBAL_tot_agc_recovered;
87//arrays.c
88#if HAVE_MMAP
89EXTERNAL struct MMAP_ARRAY_BLOCK* GLOBAL_mmap_arrays;
90#endif
91#ifdef DEBUG
92//computils.c
93EXTERNAL char GLOBAL_Option[20];
94EXTERNAL YP_FILE* GLOBAL_logfile;
95//init.c
96//int output_msg =FALSE
97#endif
98#if defined(COFF) || defined(A_OUT)
99// loada_coff.c && load_aout.c
100EXTERNAL char GLOBAL_Executable[MAX_PATH];
101#endif
102EXTERNAL int GLOBAL_OpaqueHandlersCount;
103EXTERNAL struct YAP_opaque_handler_struct* GLOBAL_OpaqueHandlers;
104#if __simplescalar__
105EXTERNAL char GLOBAL_pwd[MAX_PATH];
106#endif
107//udi.c
108//struct udi_control_block RtreeCmd void
109EXTERNAL const char* GLOBAL_RestoreFile;
110//gprof.c
111EXTERNAL Int GLOBAL_ProfCalls;
112EXTERNAL Int GLOBAL_ProfGCs;
113EXTERNAL Int GLOBAL_ProfHGrows;
114EXTERNAL Int GLOBAL_ProfSGrows;
115EXTERNAL Int GLOBAL_ProfMallocs;
116EXTERNAL Int GLOBAL_ProfIndexing;
117EXTERNAL Int GLOBAL_ProfOn;
118EXTERNAL Int GLOBAL_ProfOns;
119EXTERNAL struct RB_red_blk_node* GLOBAL_ProfilerRoot;
120EXTERNAL struct RB_red_blk_node* GLOBAL_ProfilerNil;
121EXTERNAL char* GLOBAL_DIRNAME;
122#if LOW_PROF
123EXTERNAL int GLOBAL_ProfilerOn;
124EXTERNAL FILE* GLOBAL_FProf;
125EXTERNAL FILE* GLOBAL_FPreds;
126#endif /* LOW_PROF */
127// Mutexes
128#if THREADS
129EXTERNAL struct swi_mutex* GLOBAL_FreeMutexes;
130EXTERNAL struct swi_mutex* GLOBAL_mutex_backbone;
131EXTERNAL lockvar GLOBAL_MUT_ACCESS;
132#endif
133EXTERNAL char* GLOBAL_Home;
134/* ISO char conversion: I will make no comments */
135EXTERNAL char* GLOBAL_CharConversionTable;
136EXTERNAL char* GLOBAL_CharConversionTable2;
137/* max priority */
138EXTERNAL int GLOBAL_MaxPriority;
141EXTERNAL int GLOBAL_NOfFileAliases;
142EXTERNAL int GLOBAL_SzOfFileAliases;
143EXTERNAL struct vfs* GLOBAL_VFS;
144EXTERNAL char* GLOBAL_cwd;
145
struct AliasDescS * GLOBAL_FileAliases
alias table access
Definition: h0globals.h:140
opaque variables can interact with the system
Definition: YapDefs.h:229
Definition: TermExt.h:99
Definition: VFS.h:74