Update of /cvsroot/q-lang/pd-qext
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22261
Modified Files:
pd.c
Log Message:
fix a deadlock between pd_send and q_tick when reading from/writing to the asynchronous message queue
Index: pd.c
===================================================================
RCS file: /cvsroot/q-lang/pd-qext/pd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pd.c 5 Oct 2007 23:53:48 -0000 1.4
--- pd.c 11 Mar 2008 20:16:41 -0000 1.5
***************
*** 66,69 ****
--- 66,70 ----
pthread_cond_wait(&x->cond_init, &x->mut_init);
pthread_cleanup_pop(1);
+ release_lock();
pthread_mutex_lock(&x->mut_x);
n = x->n_xv;
***************
*** 75,78 ****
--- 76,80 ----
}
}
+ acquire_lock();
if (n < x->a_xv) {
x->xv[x->n_xv++] = newref(y);
|