improve multi-threading support from C-interface. Still not quite there.

This commit is contained in:
Vitor Santos Costa
2012-12-11 22:07:10 +00:00
parent ac74c9e3de
commit e41f821d67
11 changed files with 126 additions and 79 deletions

View File

@@ -1157,6 +1157,7 @@ InitFirstWorkerThreadHandle(void)
pthread_mutex_init(&REMOTE_ThreadHandle(0).tlock, NULL);
pthread_mutex_init(&REMOTE_ThreadHandle(0).tlock_status, NULL);
LOCAL_ThreadHandle.tdetach = MkAtomTerm(AtomFalse);
LOCAL_ThreadHandle.ref_count = 1;
#endif
}
@@ -1314,7 +1315,7 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s
#endif /* YAPOR || TABLING */
Yap_AttsSize = Atts;
Yap_InitTime();
Yap_InitTime( 0 );
/* InitAbsmi must be done before InitCodes */
/* This must be done before initialising predicates */
for (i = 0; i <= NUMBER_OF_YAP_FLAGS; i++) {