fix compilation for or-parallelism

This commit is contained in:
Ricardo Rocha 2011-12-05 17:02:06 +00:00
parent 038c1854d0
commit ea337366fe
4 changed files with 11 additions and 11 deletions

View File

@ -310,7 +310,7 @@
#if defined(GLOBAL_TRIE_LOCK_AT_NODE_LEVEL) || defined(GLOBAL_TRIE_LOCK_AT_WRITE_LEVEL)
#define GLOBAL_TRIE_LOCK_USING_NODE_FIELD 1
#endif
#elif TRIE_LOCK_USING_GLOBAL_ARRAY
#elif defined(TRIE_LOCK_USING_GLOBAL_ARRAY)
#if defined(SUBGOAL_TRIE_LOCK_AT_NODE_LEVEL) || defined(SUBGOAL_TRIE_LOCK_AT_WRITE_LEVEL)
#define SUBGOAL_TRIE_LOCK_USING_GLOBAL_ARRAY 1
#endif

View File

@ -38,7 +38,7 @@
#ifdef MMAP_MEMORY_MAPPING_SCHEME
#define PATH_MAX 1000
char mapfile_path[PATH_MAX];
#elif SHM_MEMORY_MAPPING_SCHEME
#elif defined(SHM_MEMORY_MAPPING_SCHEME)
int shm_mapid[MAX_WORKERS + 2];
#endif /* MEMORY_MAPPING_SCHEME */
@ -82,7 +82,7 @@ void Yap_init_yapor_global_local_memory(void) {
if (close(fd_mapfile) == -1)
Yap_Error(FATAL_ERROR, TermNil, "close error (Yap_init_yapor_global_local_memory)");
}
#elif SHM_MEMORY_MAPPING_SCHEME
#elif defined(SHM_MEMORY_MAPPING_SCHEME)
/* place as segment MAX_WORKERS (0..MAX_WORKERS-1 reserved for worker areas) */
shm_map_memory(MAX_WORKERS, GLOBAL_LOCAL_STRUCTS_AREA, (void *) Yap_local);
#endif /* MEMORY_MAPPING_SCHEME */
@ -121,7 +121,7 @@ void Yap_init_yapor_stacks_memory(UInt TrailStackArea, UInt HeapStackArea, UInt
if (close(fd_mapfile) == -1)
Yap_Error(FATAL_ERROR, TermNil, "close error (Yap_init_yapor_stacks_memory)");
}
#elif SHM_MEMORY_MAPPING_SCHEME
#elif defined(SHM_MEMORY_MAPPING_SCHEME)
/* place heap stack segment as MAX_WORKERS+1 */
shm_map_memory(MAX_WORKERS + 1, HeapStackArea, (void *) Yap_HeapBase);
#if defined(YAPOR_COPY) || defined(YAPOR_SBA)
@ -225,7 +225,7 @@ void Yap_unmap_yapor_memory (void) {
INFORMATION_MESSAGE("Removing mapfile \"%s\"", mapfile_path);
else
INFORMATION_MESSAGE("Can't remove mapfile \"%s\"", mapfile_path);
#elif SHM_MEMORY_MAPPING_SCHEME
#elif defined(SHM_MEMORY_MAPPING_SCHEME)
#if defined(YAPOR_COPY) || defined(YAPOR_SBA)
shm_unmap_memory(MAX_WORKERS);
shm_unmap_memory(MAX_WORKERS + 1);

View File

@ -353,7 +353,7 @@ static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames(tg_sol_fr_ptr, int);
#define LOCK_SUBGOAL_NODE(NODE) LOCK(TrNode_lock(NODE))
#define UNLOCK_SUBGOAL_NODE(NODE) UNLOCK(TrNode_lock(NODE))
#define SgNode_init_lock_field(NODE) INIT_LOCK(TrNode_lock(NODE))
#elif SUBGOAL_TRIE_LOCK_USING_GLOBAL_ARRAY
#elif defined(SUBGOAL_TRIE_LOCK_USING_GLOBAL_ARRAY)
#define LOCK_SUBGOAL_NODE(NODE) LOCK(HASH_TRIE_LOCK(NODE))
#define UNLOCK_SUBGOAL_NODE(NODE) UNLOCK(HASH_TRIE_LOCK(NODE))
#define SgNode_init_lock_field(NODE)
@ -367,7 +367,7 @@ static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames(tg_sol_fr_ptr, int);
#define LOCK_ANSWER_NODE(NODE) LOCK(TrNode_lock(NODE))
#define UNLOCK_ANSWER_NODE(NODE) UNLOCK(TrNode_lock(NODE))
#define AnsNode_init_lock_field(NODE) INIT_LOCK(TrNode_lock(NODE))
#elif ANSWER_TRIE_LOCK_USING_GLOBAL_ARRAY
#elif defined(ANSWER_TRIE_LOCK_USING_GLOBAL_ARRAY)
#define LOCK_ANSWER_NODE(NODE) LOCK(HASH_TRIE_LOCK(NODE))
#define UNLOCK_ANSWER_NODE(NODE) UNLOCK(HASH_TRIE_LOCK(NODE))
#define AnsNode_init_lock_field(NODE)
@ -381,7 +381,7 @@ static inline tg_sol_fr_ptr CUT_prune_tg_solution_frames(tg_sol_fr_ptr, int);
#define LOCK_GLOBAL_NODE(NODE) LOCK(TrNode_lock(NODE))
#define UNLOCK_GLOBAL_NODE(NODE) UNLOCK(TrNode_lock(NODE))
#define GtNode_init_lock_field(NODE) INIT_LOCK(TrNode_lock(NODE))
#elif GLOBAL_TRIE_LOCK_USING_GLOBAL_ARRAY
#elif defined(GLOBAL_TRIE_LOCK_USING_GLOBAL_ARRAY)
#define LOCK_GLOBAL_NODE(NODE) LOCK(HASH_TRIE_LOCK(NODE))
#define UNLOCK_GLOBAL_NODE(NODE) UNLOCK(HASH_TRIE_LOCK(NODE))
#define GtNode_init_lock_field(NODE)

View File

@ -30,7 +30,7 @@ PL_get_chars_ex(term_t t, char **s, unsigned int flags)
}
#undef PL_get_atom_ex
//#undef PL_get_atom_ex
int
PL_get_atom_ex__LD(term_t t, atom_t *a ARG_LD)
@ -39,7 +39,7 @@ PL_get_atom_ex__LD(term_t t, atom_t *a ARG_LD)
return PL_error(NULL, 0, NULL, ERR_TYPE, ATOM_atom, t);
}
/*
int
PL_get_atom_ex(term_t t, atom_t *a)
{ if ( PL_get_atom(t, a) )
@ -47,7 +47,7 @@ PL_get_atom_ex(term_t t, atom_t *a)
return PL_error(NULL, 0, NULL, ERR_TYPE, ATOM_atom, t);
}
*/
int
PL_get_integer_ex(term_t t, int *i)