This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/H/generated/hglobals.h

149 lines
4.0 KiB
C
Raw Normal View History

2015-09-21 23:05:36 +01:00
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
2016-04-26 15:33:16 +01:00
please do not update, update H/GLOBALS instead */
2014-06-22 17:35:05 +01:00
2016-01-03 02:02:41 +00:00
//
// File defining fields in the Yap_GLOBAL global structure
//
// these fields used to spread all over the place, because they must be used in 3 ways:
// - they must be defined somewhere
// - they have an #ifdef to get a shorter name
// - they must be initialised somewhere
// - they may be of interest to restore
//
// The defs include 3+ components:
// Type
// name in structured / global name
2016-01-03 02:02:41 +00:00
// init code (optional)
// restore code (optional)
//
// Stuff that must be shared by all threads or workers
2014-06-22 17:35:05 +01:00
typedef struct global_data {
2016-01-03 02:02:41 +00:00
// initialization: tell whether the system has been initialised and by whom.
2014-06-22 17:35:05 +01:00
int Initialised_;
int InitialisedFromPL_;
int PL_Argc_;
char** PL_Argv_;
bool FAST_BOOT_FLAG_;
2016-01-03 02:02:41 +00:00
// halt hooks
2014-06-22 17:35:05 +01:00
struct halt_hook* HaltHooks_;
2015-01-26 04:02:46 +00:00
fptr_t JIT_finalizer_;
2016-01-03 02:02:41 +00:00
// stack overflow expansion/gc control
2014-06-22 17:35:05 +01:00
int AllowLocalExpansion_;
int AllowGlobalExpansion_;
int AllowTrailExpansion_;
UInt SizeOfOverflow_;
2016-01-03 02:02:41 +00:00
// amount of space recovered in all garbage collections
2014-06-22 17:35:05 +01:00
UInt AGcThreshold_;
Agc_hook AGCHook_;
#if __ANDROID__
2016-01-03 02:02:41 +00:00
// no need to perform initialization, it is done before we start the Prolog engine.
2014-06-22 17:35:05 +01:00
struct AAssetManager* assetManager_;
2015-04-13 13:28:17 +01:00
char* AssetsWD_;
2014-06-22 17:35:05 +01:00
#endif
2016-01-03 02:02:41 +00:00
/* multi-thread support */
2014-06-22 17:35:05 +01:00
#if THREADS
2016-01-03 02:02:41 +00:00
/* number of threads and processes in system */
2014-06-22 17:35:05 +01:00
UInt NOfThreads_;
2016-01-03 02:02:41 +00:00
/* number of threads created since start */
2014-06-22 17:35:05 +01:00
UInt NOfThreadsCreated_;
2016-01-03 02:02:41 +00:00
/* total run time for dead threads */
2014-06-22 17:35:05 +01:00
UInt ThreadsTotalTime_;
2016-01-03 02:02:41 +00:00
// Threads Array
2014-06-22 17:35:05 +01:00
lockvar ThreadHandlesLock_;
#endif
2014-06-22 17:35:05 +01:00
#if defined(YAPOR) || defined(THREADS)
2016-01-03 02:02:41 +00:00
// protect long critical regions
2014-06-22 17:35:05 +01:00
lockvar BGL_;
#endif
#if defined(YAPOR) || defined(TABLING)
struct global_optyap_data optyap_data_;
#endif /* YAPOR || TABLING */
2016-01-03 02:02:41 +00:00
// whether Yap is responsible for signal handling
2014-06-22 17:35:05 +01:00
int PrologShouldHandleInterrupts_;
2016-01-03 02:02:41 +00:00
/* This is the guy who actually started the system, and who has the correct registers */
2014-06-22 17:35:05 +01:00
#if defined(THREADS)
pthread_t master_thread_;
2014-10-13 12:34:52 +01:00
struct thread_mbox* named_mboxes_;
lockvar mboxq_lock_;
UInt mbox_count_;
struct swi_mutex* WithMutex_;
2014-06-22 17:35:05 +01:00
#endif /* THREADS */
// streams
struct stream_desc* Stream_;
2015-11-11 17:15:14 +00:00
#if defined(THREADS)||defined(YAPOR)
2015-07-23 01:19:35 +01:00
lockvar StreamDescLock_;
#endif
// access to yap initial arguments
2014-06-22 17:35:05 +01:00
char** argv_;
int argc_;
2016-01-03 02:02:41 +00:00
// extensions to Terms
2014-06-22 17:35:05 +01:00
#ifdef COROUTINING
2016-01-03 02:02:41 +00:00
/* array with the ops for your favourite extensions */
2014-06-22 17:35:05 +01:00
ext_op attas_[attvars_ext+1];
#endif
2016-01-03 02:02:41 +00:00
// agc.c
2014-06-22 17:35:05 +01:00
int agc_calls_;
YAP_ULONG_LONG agc_collected_;
2016-01-03 02:02:41 +00:00
/* total time spent in GC */
2014-06-22 17:35:05 +01:00
Int tot_agc_time_;
2016-01-03 02:02:41 +00:00
/* number of heap objects in all garbage collections */
2014-06-22 17:35:05 +01:00
Int tot_agc_recovered_;
2016-01-03 02:02:41 +00:00
//arrays.c
2014-06-22 17:35:05 +01:00
#if HAVE_MMAP
struct MMAP_ARRAY_BLOCK* mmap_arrays_;
#endif
#ifdef DEBUG
2016-01-03 02:02:41 +00:00
//computils.c
2014-06-22 17:35:05 +01:00
char Option_[20];
YP_FILE* logfile_;
2016-01-03 02:02:41 +00:00
//init.c
//int output_msg =FALSE
2014-06-22 17:35:05 +01:00
#endif
#if defined(COFF) || defined(A_OUT)
2016-01-03 02:02:41 +00:00
// loada_coff.c && load_aout.c
2014-06-22 17:35:05 +01:00
char Executable_[YAP_FILENAME_MAX];
#endif
int OpaqueHandlersCount_;
struct opaque_handler_struct* OpaqueHandlers_;
#if __simplescalar__
char pwd_[YAP_FILENAME_MAX];
#endif
2016-01-03 02:02:41 +00:00
//udi.c
//struct udi_control_block RtreeCmd void
const char* RestoreFile_;
2016-01-03 02:02:41 +00:00
//gprof.c
2014-06-22 17:35:05 +01:00
Int ProfCalls_;
Int ProfGCs_;
Int ProfHGrows_;
Int ProfSGrows_;
Int ProfMallocs_;
Int ProfIndexing_;
Int ProfOn_;
Int ProfOns_;
struct RB_red_blk_node* ProfilerRoot_;
struct RB_red_blk_node* ProfilerNil_;
char* DIRNAME_;
#if LOW_PROF
int ProfilerOn_;
FILE* FProf_;
FILE* FPreds_;
#endif /* LOW_PROF */
2016-01-03 02:02:41 +00:00
// Mutexes
2014-11-27 10:02:04 +00:00
#if THREADS
struct swi_mutex* FreeMutexes_;
struct swi_mutex* mutex_backbone_;
lockvar MUT_ACCESS_;
#endif
char* Home_;
2016-01-03 02:02:41 +00:00
/* ISO char conversion: I will make no comments */
char* CharConversionTable_;
char* CharConversionTable2_;
2016-01-03 02:02:41 +00:00
/* max priority */
int MaxPriority_;
/// alias table access
struct AliasDescS* FileAliases_;
int NOfFileAliases_;
int SzOfFileAliases_;
2014-06-22 17:35:05 +01:00
} w_shared;