/* This is the thread for the monitor which checks for input on the channels
which are not currently in use. */
-static pthread_t monitor_thread;
+static ast_mutex_t monitor_thread;
static int mthreadactive = -1; /* Flag for monitoring monitorthread.*/
bridges[i].fo = fo;
bridges[i].c0 = c0;
bridges[i].c1 = c1;
- pthread_mutex_init(&bridges[i].lock, NULL);
+ ast_mutex_init(&bridges[i].lock, NULL);
pthread_cond_init(&bridges[i].cond, NULL);
}
} ast_mutex_unlock(&bridge_lock);
ast_mutex_lock(&bridge_lock); {
bridges[i].inuse = 0;
- pthread_mutex_destroy(&bridges[i].lock);
+ ast_mutex_destroy(&bridges[i].lock);
pthread_cond_destroy(&bridges[i].cond);
} ast_mutex_unlock(&bridge_lock);
tmp->readthread = 0;
- pthread_mutex_init(&tmp->lock, NULL);
+ ast_mutex_init(&tmp->lock, NULL);
if (setrxgain)
vpb_record_set_gain(tmp->handle, rxgain);
while(iflist) {
p = iflist;
- pthread_mutex_destroy(&p->lock);
+ ast_mutex_destroy(&p->lock);
pthread_cancel(p->readthread);
p->readthread = 0;
ast_mutex_lock(&bridge_lock); {
memset(bridges, 0, sizeof bridges);
} ast_mutex_unlock(&bridge_lock);
- pthread_mutex_destroy(&bridge_lock);
+ ast_mutex_destroy(&bridge_lock);
tcounter = 0;