iallows threads to start
This commit is contained in:
parent
4b8a9a4f4e
commit
014d903b4f
3
C/init.c
3
C/init.c
@ -1244,9 +1244,6 @@ InitCodes(void)
|
||||
int wid;
|
||||
#include "ihstruct.h"
|
||||
InitGlobal();
|
||||
for (wid = 0; wid < MAX_INITS; wid++) {
|
||||
InitWorker(wid);
|
||||
}
|
||||
InitFirstWorkerThreadHandle();
|
||||
/* make sure no one else can use these two atoms */
|
||||
CurrentModule = 0;
|
||||
|
@ -165,6 +165,7 @@ setup_engine(int myworker_id, int init_thread)
|
||||
REGSTORE *standard_regs;
|
||||
|
||||
standard_regs = (REGSTORE *)calloc(1,sizeof(REGSTORE));
|
||||
regcache = standard_regs;
|
||||
/* create the YAAM descriptor */
|
||||
FOREIGN_ThreadHandle(myworker_id).default_yaam_regs = standard_regs;
|
||||
if (init_thread) {
|
||||
@ -200,6 +201,7 @@ thread_run(void *widp)
|
||||
int myworker_id = *((int *)widp);
|
||||
|
||||
start_thread(myworker_id);
|
||||
regcache = ((REGSTORE *)pthread_getspecific(Yap_yaamregs_key));
|
||||
do {
|
||||
t = tgs[0] = Yap_PopTermFromDB(MY_ThreadHandle.tgoal);
|
||||
if (t == 0) {
|
||||
|
Reference in New Issue
Block a user