View | Details | Raw Unified
Collapse All | Expand All

(-) Yap-5.0.1.orig/OPTYap/tab.structs.h (-10 / +18 lines)
 Lines 463-469    Link Here 
{
{
  int j;
  int j;
  /* Then save the whole heap */
  /* Then save the whole heap */
#if defined(YAPOR) || defined(TABLING)
#if defined(YAPOR) || defined(TABLING) && !defined(YAP_MEMORY_ALLOC_SCHEME)
  /* skip the local and global data structures */
  /* skip the local and global data structures */
  j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
  j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
  putout(j);
  putout(j);
 Lines 871-877    Link Here 
static int 
static int 
CopyCode(void)
CopyCode(void)
{
{
#if defined(YAPOR) || defined(TABLING)
#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME)
  /* skip the local and global data structures */
  /* skip the local and global data structures */
  CELL j = get_cell();
  CELL j = get_cell();
  if (Yap_ErrorMessage)
  if (Yap_ErrorMessage)
 Lines 26-33    Link Here 
/* ----------------------------------------- **
/* ----------------------------------------- **
**      memory alloc scheme (define one)     **
**      memory alloc scheme (define one)     **
** ----------------------------------------- */
** ----------------------------------------- */
#define SHM_MEMORY_ALLOC_SCHEME 1
/* #define SHM_MEMORY_ALLOC_SCHEME 1 */
/* #define YAP_MEMORY_ALLOC_SCHEME 1 */
#define YAP_MEMORY_ALLOC_SCHEME 1
/* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */
/* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */
/* ------------------------------------------- **
/* ------------------------------------------- **
 Lines 159-167    Link Here 
void init_local(void) {
void init_local(void) {
#if defined(YAPOR) || defined(THREADS)
  LOCAL = REMOTE + worker_id;
#endif
#ifdef YAPOR
#ifdef YAPOR
  /* local data related to or-parallelism */
  /* local data related to or-parallelism */
  LOCAL = REMOTE + worker_id;
  LOCAL_top_cp = B_BASE;
  LOCAL_top_cp = B_BASE;
  LOCAL_top_or_fr = GLOBAL_root_or_fr;
  LOCAL_top_or_fr = GLOBAL_root_or_fr;
  LOCAL_load = 0;
  LOCAL_load = 0;
 Lines 41-47    Link Here 
** ---------------------- */
** ---------------------- */
struct pages {
struct pages {
#ifdef YAPOR
#if defined(YAPOR) || defined(THREADS)
  lockvar lock;
  lockvar lock;
#endif /* YAPOR */
#endif /* YAPOR */
  volatile long pages_allocated;
  volatile long pages_allocated;
 Lines 274-282    Link Here 
** --------------------------- */
** --------------------------- */
struct local_data{
struct local_data{
#if defined(YAPOR) || defined(THREADS)
  lockvar lock;
#endif
#ifdef YAPOR
#ifdef YAPOR
  /* local data related to or-parallelism */
  /* local data related to or-parallelism */
  lockvar lock;
  volatile int load;
  volatile int load;
  choiceptr top_choice_point;
  choiceptr top_choice_point;
  struct or_frame *top_or_frame;
  struct or_frame *top_or_frame;
 Lines 50-56    Link Here 
** ---------------------------- */
** ---------------------------- */
typedef struct table_entry {
typedef struct table_entry {
#ifdef YAPOR
#if defined(YAPOR) || defined(THREADS)
  lockvar lock;
  lockvar lock;
#endif /* YAPOR */
#endif /* YAPOR */
  struct pred_entry *pred_entry;
  struct pred_entry *pred_entry;
 Lines 149-156    Link Here 
** ------------------------------ */
** ------------------------------ */
typedef struct subgoal_frame {
typedef struct subgoal_frame {
#ifdef YAPOR
#if defined(YAPOR) || defined(THREADS)
  lockvar lock;
  lockvar lock;
#endif
#ifdef YAPOR
  int generator_worker;
  int generator_worker;
  struct or_frame *top_or_frame_on_generator_branch;
  struct or_frame *top_or_frame_on_generator_branch;
#endif /* YAPOR */
#endif /* YAPOR */
 Lines 225-232    Link Here 
** --------------------------------- */
** --------------------------------- */
typedef struct dependency_frame {
typedef struct dependency_frame {
#ifdef YAPOR
#if defined(YAPOR) || defined(THREADS)
  lockvar lock;
  lockvar lock;
#endif
#ifdef YAPOR
  int leader_dependency_is_on_stack;
  int leader_dependency_is_on_stack;
  struct or_frame *top_or_frame;
  struct or_frame *top_or_frame;
#ifdef TIMESTAMP_CHECK
#ifdef TIMESTAMP_CHECK