halt_hooks should not be in save/restore, this will cause trouble.

This commit is contained in:
Vítor Santos Costa 2010-11-29 18:08:29 +00:00
parent 863747da7b
commit 2a8854094b
11 changed files with 11 additions and 23 deletions

View File

@ -217,3 +217,5 @@
#define Yap_PL_Argc Yap_global->pl_argc
#define Yap_PL_Argv Yap_global->pl_argv
#define Yap_HaltHooks Yap_global->yap_halt_hook

View File

@ -263,8 +263,6 @@
#define Stream Yap_heap_regs->yap_streams
#define Yap_HaltHooks Yap_heap_regs->yap_halt_hook
#define NOfFileAliases Yap_heap_regs->n_of_file_aliases
#define SzOfFileAliases Yap_heap_regs->sz_of_file_aliases
#define FileAliases Yap_heap_regs->file_aliases

View File

@ -218,4 +218,6 @@ typedef struct worker_shared {
int initialised_from_pl;
int pl_argc;
char **pl_argv;
struct halt_hook *yap_halt_hook;
} w_shared;

View File

@ -263,8 +263,6 @@
struct stream_desc *yap_streams;
struct halt_hook *yap_halt_hook;
UInt n_of_file_aliases;
UInt sz_of_file_aliases;
struct AliasDescS *file_aliases;

View File

@ -216,4 +216,6 @@ static void InitGlobal(void) {
Yap_global->initialised_from_pl = FALSE;
Yap_global->pl_argc = 0;
Yap_global->pl_argv = NULL;
Yap_global->yap_halt_hook = NULL;
}

View File

@ -263,8 +263,6 @@
Yap_heap_regs->yap_streams = NULL;
Yap_heap_regs->yap_halt_hook = NULL;
Yap_heap_regs->n_of_file_aliases = 0;
Yap_heap_regs->sz_of_file_aliases = 0;
Yap_heap_regs->file_aliases = NULL;

View File

@ -216,4 +216,6 @@ static void RestoreGlobal(void) {
}

View File

@ -903,18 +903,6 @@ RestoreDBErasedIList(void)
}
}
static void
RestoreHaltHooks(void)
{
struct halt_hook *hooke = Yap_HaltHooks = HaltHookAdjust(Yap_HaltHooks);
while (hooke) {
hooke->next = HaltHookAdjust(hooke->next);
hooke = hooke->next;
}
}
static void
RestoreStreams(void)
{

View File

@ -263,8 +263,6 @@
RestoreStreams();
RestoreHaltHooks();
RestoreAliases();

View File

@ -245,5 +245,8 @@ int initialised_from_pl Yap_InitialisedFromPL =FALSE
int pl_argc Yap_PL_Argc =0
char **pl_argv Yap_PL_Argv =NULL
// halt hooks
struct halt_hook *yap_halt_hook Yap_HaltHooks =NULL
END_WORKER_SHARED

View File

@ -295,9 +295,6 @@ struct operator_entry *op_list OpList =NULL OpListAdjust
/* stream array */
struct stream_desc *yap_streams Stream =NULL RestoreStreams()
/* halt hooks */
struct halt_hook *yap_halt_hook Yap_HaltHooks =NULL RestoreHaltHooks()
/* stream aliases */
UInt n_of_file_aliases NOfFileAliases =0 void
UInt sz_of_file_aliases SzOfFileAliases =0 void