move message queues to C
This commit is contained in:
16
C/init.c
16
C/init.c
@@ -1183,6 +1183,22 @@ InitThreadHandle(int wid)
|
||||
pthread_mutex_init(&(REMOTE_ThreadHandle(wid).tlock_status), NULL);
|
||||
REMOTE_ThreadHandle(wid).tdetach = (CELL)0;
|
||||
REMOTE_ThreadHandle(wid).cmod = (CELL)0;
|
||||
{
|
||||
mbox_t * mboxp = &REMOTE_ThreadHandle(wid).mbox_handle;
|
||||
pthread_mutex_t *mutexp;
|
||||
pthread_cond_t *condp;
|
||||
struct idb_queue *msgsp;
|
||||
|
||||
mboxp->name = MkIntTerm(0);
|
||||
condp = & mboxp->cond;
|
||||
pthread_cond_init(condp, NULL);
|
||||
mutexp = & mboxp->mutex;
|
||||
pthread_mutex_init(mutexp, NULL);
|
||||
msgsp = & mboxp->msgs;
|
||||
mboxp->nmsgs = 0;
|
||||
Yap_init_tqueue(msgsp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user