[asterisk-dev] Seeking built-in channel waiter function

Yaroslav Panych panych.y at gmail.com
Thu Oct 6 10:08:03 CDT 2011


Ok, then.
What about adding new custom frame type? Like AST_FRAME_MYSUPERFRAME?
Then in my worker thread I will queue it into channel(instead of
signaling sync object), and in channel thread I can use simple
ast_waitfor and analyse returned frame type. How much code I should
change in asterisk to let it to deliver it without any losts?

2011/10/6 Kevin P. Fleming <kpfleming at digium.com>:
> On 10/06/2011 08:27 AM, Yaroslav Panych wrote:
>>
>> Hello
>>
>>
>> Is there available in asterisk core and ready made function which does
>> next work:
>> As arguments it receives struct ast_channel* and thread
>> synchronisation object(semaphore, mutex, cond, etc).
>> This function waits for next frame in channel or when given sync
>> object becomes signalled and then returns.
>
> No, there isn't, mostly because there is no API in the POSIX arsenal that
> could be used to implement it atomically.
>
> --
> Kevin P. Fleming
> Digium, Inc. | Director of Software Technologies
> Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at www.digium.com & www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list