YAP 7.1.0
hglobals.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
21typedef struct global_data {
22// initialization: tell whether the system has been initialised and by whom.
23 int Initialised_;
24 int InitialisedFromPL_;
25 int PL_Argc_;
26 char** PL_Argv_;
27 bool FAST_BOOT_FLAG_;
28// halt hooks
29 struct halt_hook* HaltHooks_;
30 fptr_t JIT_finalizer_;
31// stack overflow expansion/gc control
32 int AllowLocalExpansion_;
33 int AllowGlobalExpansion_;
34 int AllowTrailExpansion_;
35 UInt SizeOfOverflow_;
36// amount of space recovered in all garbage collections
37 UInt AGcThreshold_;
38 Agc_hook AGCHook_;
39/* multi-thread support */
40#if THREADS
41/* number of threads and processes in system */
42 UInt NOfThreads_;
43/* number of threads created since start */
44 UInt NOfThreadsCreated_;
45/* total run time for dead threads */
46 UInt ThreadsTotalTime_;
47// Threads Array
48 lockvar ThreadHandlesLock_;
49#endif
50#if defined(YAPOR) || defined(THREADS)
51// protect long critical regions
52 lockvar BGL_;
53#endif
54#if defined(YAPOR) || defined(TABLING)
55 struct global_optyap_data optyap_data_;
56#endif /* YAPOR || TABLING */
57// whether Yap is responsible for signal handling
58 int PrologShouldHandleInterrupts_;
59/* This is the guy who actually started the system, and who has the correct registers */
60#if defined(THREADS)
61 pthread_t master_thread_;
62 struct thread_mbox* named_mboxes_;
63 lockvar mboxq_lock_;
64 UInt mbox_count_;
65 struct swi_mutex* WithMutex_;
66#endif /* THREADS */
67// streams
68 struct stream_desc* Stream_;
69#if defined(THREADS)||defined(YAPOR)
70 lockvar StreamDescLock_;
71#endif
72// access to yap initial arguments
73 char** argv_;
74 int argc_;
75// extensions to Terms
76#ifdef COROUTINING
77/* array with the ops for your favourite extensions */
78 ext_op attas_[attvars_ext+1];
79#endif
80// agc.c
81 int agc_calls_;
82 YAP_ULONG_LONG agc_collected_;
83/* total time spent in GC */
84 Int tot_agc_time_;
85/* number of heap objects in all garbage collections */
86 Int tot_agc_recovered_;
87//arrays.c
88#if HAVE_MMAP
89 struct MMAP_ARRAY_BLOCK* mmap_arrays_;
90#endif
91#ifdef DEBUG
92//computils.c
93 char Option_[20];
94 YP_FILE* 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
100 char Executable_[MAX_PATH];
101#endif
102 int OpaqueHandlersCount_;
103 struct YAP_opaque_handler_struct* OpaqueHandlers_;
104#if __simplescalar__
105 char pwd_[MAX_PATH];
106#endif
107//udi.c
108//struct udi_control_block RtreeCmd void
109const char* RestoreFile_;
110//gprof.c
111 Int ProfCalls_;
112 Int ProfGCs_;
113 Int ProfHGrows_;
114 Int ProfSGrows_;
115 Int ProfMallocs_;
116 Int ProfIndexing_;
117 Int ProfOn_;
118 Int ProfOns_;
119 struct RB_red_blk_node* ProfilerRoot_;
120 struct RB_red_blk_node* ProfilerNil_;
121 char* DIRNAME_;
122#if LOW_PROF
123 int ProfilerOn_;
124 FILE* FProf_;
125 FILE* FPreds_;
126#endif /* LOW_PROF */
127// Mutexes
128#if THREADS
129 struct swi_mutex* FreeMutexes_;
130 struct swi_mutex* mutex_backbone_;
131 lockvar MUT_ACCESS_;
132#endif
133 char* Home_;
134/* ISO char conversion: I will make no comments */
135 char* CharConversionTable_;
136 char* CharConversionTable2_;
137/* max priority */
138 int MaxPriority_;
141 int NOfFileAliases_;
142 int SzOfFileAliases_;
143 struct vfs* VFS_;
144 char* cwd_;
145} w_shared;
opaque variables can interact with the system
Definition: YapDefs.h:229
Definition: TermExt.h:99
struct AliasDescS * FileAliases_
alias table access
Definition: hglobals.h:140
Definition: VFS.h:74