moved several global variables to misc/GLOBALS

This commit is contained in:
Joao
2011-05-25 16:40:36 +01:00
parent 8170f6d3cb
commit 971ad94311
63 changed files with 1724 additions and 1329 deletions

View File

@@ -405,7 +405,7 @@ Yap_thread_create_engine(thread_attr *ops)
ops->sysize = 0;
ops->egoal = t;
}
if (pthread_self() != Yap_master_thread) {
if (pthread_self() != GLOBAL_master_thread) {
/* we are worker_id 0 for now, lock master thread so that no one messes with us */
pthread_setspecific(Yap_yaamregs_key, (const void *)&Yap_standard_regs);
pthread_mutex_lock(&(REMOTE_ThreadHandle(0).tlock));
@@ -416,7 +416,7 @@ Yap_thread_create_engine(thread_attr *ops)
REMOTE_ThreadHandle(new_id).id = new_id;
REMOTE_ThreadHandle(new_id).ref_count = 0;
setup_engine(new_id, FALSE);
if (pthread_self() != Yap_master_thread) {
if (pthread_self() != GLOBAL_master_thread) {
pthread_setspecific(Yap_yaamregs_key, NULL);
pthread_mutex_unlock(&(REMOTE_ThreadHandle(0).tlock));
}