LOCALS and GLOBALS are now generated by misc/buildlocalglobal.

This commit is contained in:
Joao
2011-05-11 18:22:58 +01:00
parent d6fc76faf1
commit ab63cd190b
17 changed files with 1051 additions and 714 deletions

View File

@@ -7,10 +7,9 @@
// - they must be initialised somewhere
// - they may be of interest to restore
//
// The defs include 4+ components:
// The defs include 3+ components:
// Type
// name in structured
// global name
// name in structured / global name
// init code (optional)
// restore code (optional)
//
@@ -19,47 +18,43 @@
START_GLOBAL_DATA
// initialization: tell whether the system has been initialised and by whom.
int initialised GLOBAL_Initialised =FALSE
int initialised_from_pl GLOBAL_InitialisedFromPL =FALSE
int pl_argc GLOBAL_PL_Argc =0
char **pl_argv GLOBAL_PL_Argv =NULL
int Initialised =FALSE
int InitialisedFromPL =FALSE
int PL_Argc =0
char** PL_Argv =NULL
// halt hooks
struct halt_hook *yap_halt_hook GLOBAL_HaltHooks =NULL
struct halt_hook* HaltHooks =NULL
// stack overflow expansion/gc control
int allow_local_expansion GLOBAL_AllowLocalExpansion =TRUE
int allow_global_expansion GLOBAL_AllowGlobalExpansion =TRUE
int allow_trail_expansion GLOBAL_AllowTrailExpansion =TRUE
UInt size_of_overflow GLOBAL_SizeOfOverflow =0
int AllowLocalExpansion =TRUE
int AllowGlobalExpansion =TRUE
int AllowTrailExpansion =TRUE
UInt SizeOfOverflow =0
// amount of space recovered in all garbage collections
UInt agc_threshold GLOBAL_AGcThreshold =10000
Agc_hook agc_hook GLOBAL_AGCHook =NULL
UInt AGcThreshold =10000
Agc_hook AGCHook =NULL
/* multi-thread support */
#if THREADS
/* number of threads and processes in system */
UInt n_of_threads GLOBAL_NOfThreads =1
UInt NOfThreads =1
/* number of threads created since start */
UInt n_of_threads_created GLOBAL_NOfThreadsCreated =1
UInt NOfThreadsCreated =1
/* total run time for dead threads */
UInt threads_total_time GLOBAL_ThreadsTotalTime =0L
UInt ThreadsTotalTime =0L
// Threads Array
lockvar ThreadHandlesLock MkLock
#endif
// multi-thread/ORP support
#if defined(YAPOR) || defined(THREADS)
// protect long critical regions
lockvar bgl GLOBAL_BGL MkLock
lockvar BGL MkLock
#endif
// Threads Array
#ifdef THREADS
lockvar thread_handles_lock GLOBAL_ThreadHandlesLock MkLock
#endif
#if defined(YAPOR) || defined(TABLING)
struct global_optyap_data optyap_data Yap_optyap_data void
struct global_optyap_data optyap_data void
#endif /* YAPOR || TABLING */
END_GLOBAL_DATA