Add some debugging code that ensures that when we do deadlock avoidance, we

don't lose the information about how a lock was originally acquired.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-05-29 17:20:16 +00:00
parent e58b5c63c6
commit 65808210e9
8 changed files with 86 additions and 79 deletions

View File

@@ -574,9 +574,7 @@ static void mgcp_queue_frame(struct mgcp_subchannel *sub, struct ast_frame *f)
ast_mutex_unlock(&sub->owner->lock);
break;
} else {
ast_mutex_unlock(&sub->lock);
usleep(1);
ast_mutex_lock(&sub->lock);
DEADLOCK_AVOIDANCE(&sub->lock);
}
} else
break;
@@ -592,9 +590,7 @@ static void mgcp_queue_hangup(struct mgcp_subchannel *sub)
ast_mutex_unlock(&sub->owner->lock);
break;
} else {
ast_mutex_unlock(&sub->lock);
usleep(1);
ast_mutex_lock(&sub->lock);
DEADLOCK_AVOIDANCE(&sub->lock);
}
} else
break;