tries locking scheme is now independent for the answer, subgoal and global trie

This commit is contained in:
Ricardo Rocha
2011-11-15 16:57:51 +00:00
parent 8f7983b6c4
commit ec0fa8a2a3
10 changed files with 645 additions and 386 deletions

View File

@@ -213,9 +213,9 @@ struct global_optyap_data {
struct dependency_frame *root_dependency_frame;
#endif /* YAPOR */
CELL table_var_enumerator[MAX_TABLE_VARS];
#ifdef TABLE_LOCK_AT_WRITE_LEVEL
lockvar table_lock[TABLE_LOCK_BUCKETS];
#endif /* TABLE_LOCK_AT_WRITE_LEVEL */
#if defined(SUBGOAL_TRIE_LOCK_AT_WRITE_LEVEL) || defined(ANSWER_TRIE_LOCK_AT_WRITE_LEVEL) || defined(GLOBAL_TRIE_LOCK_AT_WRITE_LEVEL)
lockvar write_level_locks[LOCK_AT_WRITE_LEVEL_BUCKETS];
#endif /* SUBGOAL_TRIE_LOCK_AT_WRITE_LEVEL || ANSWER_TRIE_LOCK_AT_WRITE_LEVEL || GLOBAL_TRIE_LOCK_AT_WRITE_LEVEL */
#ifdef TIMESTAMP_CHECK
long timestamp;
#endif /* TIMESTAMP_CHECK */
@@ -282,7 +282,7 @@ struct global_optyap_data {
#define GLOBAL_root_dep_fr (GLOBAL_optyap_data.root_dependency_frame)
#define GLOBAL_table_var_enumerator(index) (GLOBAL_optyap_data.table_var_enumerator[index])
#define GLOBAL_table_var_enumerator_addr(index) (GLOBAL_optyap_data.table_var_enumerator + (index))
#define GLOBAL_table_lock(index) (GLOBAL_optyap_data.table_lock[index])
#define GLOBAL_write_level_locks(index) (GLOBAL_optyap_data.write_level_locks[index])
#define GLOBAL_timestamp (GLOBAL_optyap_data.timestamp)