diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-25 02:34:11 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-25 02:34:11 +0000 |
commit | 6d937eee360431e9ef782942368d15263d7376ff (patch) | |
tree | 5b9f31de4abfe65b58eab4424d3e6556492634ee /channels/chan_features.c | |
parent | e8943c25e55dd214c40ab2f84feb9d916a44abfc (diff) |
More expansion of the deadlock avoidance macro, including a macro to do locking
of the channel lock
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125020 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_features.c')
-rw-r--r-- | channels/chan_features.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c index 65146f463..74e2d1698 100644 --- a/channels/chan_features.c +++ b/channels/chan_features.c @@ -139,9 +139,7 @@ static void wakeup_sub(struct feature_pvt *p, int a) for (;;) { if (p->subs[a].owner) { if (ast_mutex_trylock(&p->subs[a].owner->lock)) { - ast_mutex_unlock(&p->lock); - usleep(1); - ast_mutex_lock(&p->lock); + DEADLOCK_AVOIDANCE(&p->lock); } else { ast_queue_frame(p->subs[a].owner, &null); ast_mutex_unlock(&p->subs[a].owner->lock); |