fix for threading initialization
This commit is contained in:
parent
a906bd58d6
commit
2d6fc978e4
3
C/init.c
3
C/init.c
@ -1135,7 +1135,8 @@ InitInvisibleAtoms(void)
|
||||
}
|
||||
|
||||
#ifdef THREADS
|
||||
InitThreadHandle(wid)
|
||||
static void
|
||||
InitThreadHandle(int wid)
|
||||
{
|
||||
FOREIGN_ThreadHandle(wid).in_use = FALSE;
|
||||
FOREIGN_ThreadHandle(wid).zombie = FALSE;
|
||||
|
2
H/Yap.h
2
H/Yap.h
@ -276,7 +276,7 @@ extern char Yap_Option[20];
|
||||
#endif
|
||||
#endif /* !IN_SECOND_QUADRANT */
|
||||
|
||||
/* #define RANDOMIZE_START_ADDRESS 1*/
|
||||
/* #define RANDOMIZE_START_ADDRESS 1 */
|
||||
|
||||
#ifdef USE_SYSTEM_MALLOC
|
||||
#define HEAP_INIT_BASE 0L
|
||||
|
@ -119,7 +119,7 @@ static void InitWorker(int wid) {
|
||||
#endif
|
||||
FOREIGN_WL(wid)->conttop0 = NULL;
|
||||
FOREIGN_WL(wid)->conttop = NULL;
|
||||
FOREIGN_WL(wid)->disc_trail_entries = NULL;
|
||||
FOREIGN_WL(wid)->disc_trail_entries = 0;
|
||||
|
||||
FOREIGN_WL(wid)->Gc_ma_h_top = NULL;
|
||||
FOREIGN_WL(wid)->Gc_ma_h_list = NULL;
|
||||
@ -151,7 +151,7 @@ static void InitWorker(int wid) {
|
||||
|
||||
#endif
|
||||
#ifdef THREADS
|
||||
InitThreadHandle;
|
||||
InitThreadHandle(wid);
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)].thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id].thread_handle)
|
||||
#endif
|
||||
|
@ -127,7 +127,7 @@ Term *new_tr new_TR =NULL
|
||||
#endif
|
||||
struct gc_mark_continuation* conttop0 cont_top0 =NULL
|
||||
struct gc_mark_continuation* conttop cont_top =NULL
|
||||
int disc_trail_entries discard_trail_entries =NULL
|
||||
int disc_trail_entries discard_trail_entries =0
|
||||
gc_ma_hash_entry Gc_ma_hash_table[GC_MAVARS_HASH_SIZE] gc_ma_hash_table void
|
||||
gc_ma_hash_entry* Gc_ma_h_top gc_ma_h_top =NULL
|
||||
gc_ma_hash_entry* Gc_ma_h_list gc_ma_h_list =NULL
|
||||
@ -167,7 +167,7 @@ struct worker worker WORKER void
|
||||
#endif
|
||||
|
||||
#ifdef THREADS
|
||||
struct thandle thread_handle ThreadHandle InitThreadHandle
|
||||
struct thandle thread_handle ThreadHandle InitThreadHandle(wid)
|
||||
#define FOREIGN_ThreadHandle(wid) (Yap_WLocal[(wid)].thread_handle)
|
||||
#define MY_ThreadHandle (Yap_WLocal[worker_id].thread_handle)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user