diff --git a/os/pl-file.c b/os/pl-file.c index 2fc2635e8..9556e2184 100755 --- a/os/pl-file.c +++ b/os/pl-file.c @@ -4786,6 +4786,7 @@ struct PL_local_data *Yap_InitThreadIO(int wid) { CACHE_REGS struct PL_local_data *p; + fprintf(stderr,"wid=%d\n", wid); if (wid) p = (struct PL_local_data *)malloc(sizeof(struct PL_local_data)); else @@ -4796,10 +4797,10 @@ struct PL_local_data *Yap_InitThreadIO(int wid) } #if THREADS if (wid) { - /* copy from other worker */ - memcpy(p, Yap_local[worker_id]->PL_local_data_p_, sizeof(struct PL_local_data)); + memcpy(p, Yap_local[0]->PL_local_data_p_, sizeof(struct PL_local_data)); } #endif + fprintf(stderr,"wid=%d done\n", wid); return p; }