From 62aa6df644b7b31c6b4dee7130aaabe7c8b2298b Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 10 Dec 2012 12:12:54 +0000 Subject: [PATCH] fix bad register initialization. --- C/threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/threads.c b/C/threads.c index 3047fcd86..df9c8770c 100755 --- a/C/threads.c +++ b/C/threads.c @@ -492,7 +492,6 @@ Yap_thread_create_engine(thread_attr *ops) Int Yap_thread_attach_engine(int wid) { - CACHE_REGS /* already locked pthread_mutex_lock(&(REMOTE_ThreadHandle(wid).tlock)); @@ -507,6 +506,7 @@ Yap_thread_attach_engine(int wid) REMOTE_ThreadHandle(wid).pthread_handle = pthread_self(); REMOTE_ThreadHandle(wid).ref_count++; pthread_setspecific(Yap_yaamregs_key, (const void *)REMOTE_ThreadHandle(wid).default_yaam_regs); + CACHE_REGS worker_id = wid; /* ricroc: for what I understand, this shouldn't be necessary */ DEBUG_TLOCK_ACCESS(9, wid); pthread_mutex_unlock(&(REMOTE_ThreadHandle(wid).tlock));