[asterisk-dev] chan->_softhangup

Tilghman Lesher tlesher at digium.com
Sun Feb 21 11:49:54 CST 2010


On Sunday 21 February 2010 04:18:16 Damien Wedhorn wrote:
> Tilghman Lesher wrote:
> > It's basically used as a general purpose inter-thread signal.  Whether
> > you call it softhangup or not, I don't think that the semantics are
> > terribly difficult, although the fact that all the possible causes are
> > gathered together in a single bitwise field is nice.
>
> That's the fundamental problem. It is both a general purpose bitfield
> and a specific purpose variable. If any bit is set and there is an
> active bridge, the bridge will be torn down unless the bits are all
> reset before the lock is released, irrespective of what the intent of
> the specific bit is. My initial mail probably wasn't that clear.

The intent of every bit is indeed to cause the bridge to get torn down,
applications to return, etc.  It's a general purpose interrupt, with lots of
individual causes.  That's part of what makes it such a fine solution.  I
wonder if you looked at the solution, saw the many causes, and assumed
it was a poor implementation, rather than a brilliant one.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list