the trie locking data structure (node field or global lock array) is now defined explicitly

This commit is contained in:
Ricardo Rocha
2011-11-16 11:42:04 +00:00
parent ec0fa8a2a3
commit e993c2473b
6 changed files with 145 additions and 125 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];
#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 TRIE_LOCK_USING_GLOBAL_ARRAY
lockvar trie_locks[TRIE_LOCK_BUCKETS];
#endif /* TRIE_LOCK_USING_GLOBAL_ARRAY */
#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_write_level_locks(index) (GLOBAL_optyap_data.write_level_locks[index])
#define GLOBAL_trie_locks(index) (GLOBAL_optyap_data.trie_locks[index])
#define GLOBAL_timestamp (GLOBAL_optyap_data.timestamp)