From dfe0e1854fd8152bcb4403db27fbeb462fb76473 Mon Sep 17 00:00:00 2001 From: Ricardo Rocha Date: Wed, 1 Jun 2011 18:51:12 +0100 Subject: [PATCH] init_yapor_workers -> Yap_init_yapor_workers --- C/c_interface.c | 10 ++++------ C/init.c | 8 +++----- H/Yapproto.h | 2 +- OPTYap/opt.preds.c | 4 ++++ OPTYap/opt.proto.h | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/C/c_interface.c b/C/c_interface.c index eced2b059..5ef8d66c9 100755 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -2727,14 +2727,12 @@ YAP_Init(YAP_init_args *yap_init) CELL Trail = 0, Stack = 0, Heap = 0, Atts = 0; static char boot_file[256]; - Yap_InitPageSize(); - //Yap_InitSysbits(); + Yap_InitPageSize(); /* init memory page size, required by later functions */ #if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) Yap_init_yapor_global_local_memory(); LOCAL = REMOTE(0); #endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */ -/* Init signal handling, time and memory page size, required by later functions */ - Yap_InitSysbits(); + Yap_InitSysbits(); /* init signal handling and time, required by later functions */ GLOBAL_argv = yap_init->Argv; GLOBAL_argc = yap_init->Argc; #if !BOOT_FROM_SAVED_STATE @@ -2850,10 +2848,10 @@ YAP_Init(YAP_init_args *yap_init) } yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot; #if defined(YAPOR) || defined(TABLING) - Yap_init_root_frames(); + Yap_init_root_frames(); #endif /* YAPOR || TABLING */ #ifdef YAPOR - init_yapor_workers(); + Yap_init_yapor_workers(); if (worker_id != 0) { #if defined(YAPOR_COPY) || defined(YAPOR_SBA) /* diff --git a/C/init.c b/C/init.c index 8fc4ddd42..2023e1c58 100755 --- a/C/init.c +++ b/C/init.c @@ -1060,7 +1060,7 @@ InitInvisibleAtoms(void) #ifdef YAPOR -void init_yapor_workers(void) { +void Yap_init_yapor_workers(void) { CACHE_REGS int proc; #ifdef YAPOR_THREADS @@ -1071,7 +1071,7 @@ void init_yapor_workers(void) { int son; son = fork(); if (son == -1) - Yap_Error(FATAL_ERROR, TermNil, "fork error (init_yapor_workers)"); + Yap_Error(FATAL_ERROR, TermNil, "fork error (Yap_init_yapor_workers)"); if (son > 0) { /* I am the father, I must stay here and wait for my children to all die */ struct sigaction sigact; @@ -1091,7 +1091,7 @@ void init_yapor_workers(void) { int son; son = fork(); if (son == -1) - Yap_Error(FATAL_ERROR, TermNil, "fork error (init_yapor_workers)"); + Yap_Error(FATAL_ERROR, TermNil, "fork error (Yap_init_yapor_workers)"); if (son == 0) { /* new worker */ worker_id = proc; @@ -1249,8 +1249,6 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s return; pthread_key_create(&Yap_yaamregs_key, NULL); pthread_setspecific(Yap_yaamregs_key, (const void *)&Yap_standard_regs); - //printf(" -> -> %p \n", &Yap_REGS); - //LOCAL = REMOTE(0); GLOBAL_master_thread = pthread_self(); #else /* In this case we need to initialise the abstract registers */ diff --git a/H/Yapproto.h b/H/Yapproto.h index 1836f6a4f..df5254f6e 100755 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -237,7 +237,7 @@ void STD_PROTO(Yap_InitCPredBack_,(char *, unsigned long int, unsigned int, C void STD_PROTO(Yap_InitWorkspace,(UInt,UInt,UInt,UInt,UInt,int,int,int)); #ifdef YAPOR -void STD_PROTO(init_yapor_workers, (void)); +void STD_PROTO(Yap_init_yapor_workers, (void)); #endif /* YAPOR */ #if defined(YAPOR) || defined(THREADS) void STD_PROTO(Yap_KillStacks,(int)); diff --git a/OPTYap/opt.preds.c b/OPTYap/opt.preds.c index 234f36b79..8a7281abf 100644 --- a/OPTYap/opt.preds.c +++ b/OPTYap/opt.preds.c @@ -21,9 +21,13 @@ #include "YapHeap.h" #include "SWI-Prolog.h" #ifdef YAPOR +#if HAVE_STRING_H +#include +#endif /* HAVE_STRING_H */ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ +#include "yapio.h" #include "or.macros.h" #endif /* YAPOR */ #ifdef TABLING diff --git a/OPTYap/opt.proto.h b/OPTYap/opt.proto.h index 2b496cd3f..84a09d958 100644 --- a/OPTYap/opt.proto.h +++ b/OPTYap/opt.proto.h @@ -87,9 +87,9 @@ void resume_suspension_frame(susp_fr_ptr, or_fr_ptr); -/************************** +/******************************* ** or.copy_engine.c ** -**************************/ +*******************************/ #ifdef YAPOR void make_root_choice_point(void);