fix compilation for threads

This commit is contained in:
Ricardo Rocha 2011-11-30 15:32:35 +00:00
parent 7aa77faf2a
commit 4db885e3c3

View File

@ -49,6 +49,7 @@ typedef struct table_entry {
#define TabEnt_mode_directed(X) ((X)->mode_directed_array)
#ifdef THREADS_NO_SHARING
#define TabEnt_subgoal_trie(X) ((X)->subgoal_trie[worker_id])
// ricroc: error tabling+threads
//#define TabEnt_subgoal_trie(X,I) ((X)->subgoal_trie[I])
#else
#define TabEnt_subgoal_trie(X) ((X)->subgoal_trie)
@ -242,6 +243,8 @@ typedef enum { /* do not change order !!! */
****************************/
typedef struct subgoal_entry {
// ricroc: error tabling+threads
//#if defined(YAPOR) || defined(THREADS_FULL_SHARING) || defined(THREADS_CONSUMER_SHARING)
#if defined(YAPOR) || defined(THREADS)
lockvar lock;
#endif /* YAPOR || THREADS_FULL_SHARING || THREADS_CONSUMER_SHARING */
@ -298,19 +301,15 @@ typedef struct subgoal_entry {
****************************/
typedef struct subgoal_frame {
#ifdef THREADS
#if defined(THREADS_FULL_SHARING) || defined(THREADS_CONSUMER_SHARING)
struct subgoal_entry *subgoal_entry;
#else
struct subgoal_entry subgoal_entry;
#endif /* THREADS_FULL_SHARING || THREADS_CONSUMER_SHARING */
#ifdef THREADS_FULL_SHARING
struct answer_trie_node *batched_last_answer;
struct answer_ref_node *batched_cached_answers;
#endif /* THREADS_FULL_SHARING */
#else
struct subgoal_entry subgoal_entry;
#endif /* THREADS */
#endif /* THREADS_FULL_SHARING || THREADS_CONSUMER_SHARING */
subgoal_state_flag state_flag;
choiceptr generator_choice_point;
struct subgoal_frame *next;
@ -387,7 +386,9 @@ typedef struct subgoal_frame {
*******************************/
typedef struct dependency_frame {
#if defined(YAPOR)||defined(THREADS)
// ricroc: error tabling+threads
//#ifdef YAPOR
#if defined(YAPOR) || defined(THREADS)
lockvar lock;
#endif /* YAPOR */
#ifdef YAPOR