[Asterisk-cvs] asterisk sched.c,1.10,1.11
markster at lists.digium.com
markster at lists.digium.com
Fri Nov 21 15:38:48 CST 2003
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12832
Modified Files:
sched.c
Log Message:
Unlock while processing schedule queue
Index: sched.c
===================================================================
RCS file: /usr/cvsroot/asterisk/sched.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sched.c 21 Nov 2003 20:41:43 -0000 1.10
+++ sched.c 21 Nov 2003 22:05:08 -0000 1.11
@@ -342,6 +342,7 @@
struct sched *current;
struct timeval tv;
int x=0;
+ int res;
DEBUG(ast_log(LOG_DEBUG, "ast_sched_runq()\n"));
ast_mutex_lock(&con->lock);
@@ -370,7 +371,12 @@
* the schedule queue. If that's what it wants to do, it
* should return 0.
*/
- if (current->callback(current->data)) {
+
+ ast_mutex_unlock(&con->lock);
+ res = current->callback(current->data);
+ ast_mutex_lock(&con->lock);
+
+ if (res) {
/*
* If they return non-zero, we should schedule them to be
* run again.
More information about the svn-commits
mailing list