[asterisk-dev] [Code Review] Scheduler API Cleanup and Improvements

Mark Michelson reviewboard at asterisk.org
Fri Dec 17 23:38:58 UTC 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1007/#review3049
-----------------------------------------------------------

Ship it!


I couldn't find anything wrong in the actual code you changed, but man does sched.h need some documentation cleanup, both for accuracy and grammar.

- Mark


On 2010-12-16 15:47:32, Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1007/
> -----------------------------------------------------------
> 
> (Updated 2010-12-16 15:47:32)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Previously, I had added the ast_sched_thread stuff that was a generic scheduler thread implementation.  However, if you used it, it required using different functions for modifying scheduler contents.  This patch reworks how this is done and just allows you to optionally start a thread on the original scheduler context structure that has always been there.  This makes it trivial to switch to the generic scheduler thread implementation without having to touch any of the other code that adds or removes scheduler entries.
> 
> In passing, I made some naming tweaks to add ast_ prefixes where they were not there before.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_unistim.c 298682 
>   /trunk/channels/chan_skinny.c 298682 
>   /trunk/channels/chan_mgcp.c 298682 
>   /trunk/channels/chan_sip.c 298682 
>   /trunk/channels/chan_jingle.c 298682 
>   /trunk/channels/chan_iax2.c 298682 
>   /trunk/channels/chan_gtalk.c 298682 
>   /trunk/channels/chan_h323.c 298682 
>   /trunk/channels/sip/dialplan_functions.c 298682 
>   /trunk/channels/sip/include/globals.h 298682 
>   /trunk/include/asterisk.h 298682 
>   /trunk/include/asterisk/channel.h 298682 
>   /trunk/include/asterisk/rtp_engine.h 298682 
>   /trunk/include/asterisk/sched.h 298682 
>   /trunk/include/asterisk/udptl.h 298682 
>   /trunk/main/ccss.c 298682 
>   /trunk/main/cdr.c 298682 
>   /trunk/main/channel.c 298682 
>   /trunk/main/dnsmgr.c 298682 
>   /trunk/main/rtp_engine.c 298682 
>   /trunk/main/sched.c 298682 
>   /trunk/main/udptl.c 298682 
>   /trunk/pbx/pbx_dundi.c 298682 
>   /trunk/res/res_calendar.c 298682 
>   /trunk/res/res_rtp_asterisk.c 298682 
>   /trunk/res/res_rtp_multicast.c 298682 
>   /trunk/res/res_stun_monitor.c 298682 
>   /trunk/tests/test_sched.c 298682 
> 
> Diff: https://reviewboard.asterisk.org/r/1007/diff
> 
> 
> Testing
> -------
> 
> The biggest user of the generic scheduler thread is chan_iax2.  I ran some IAX2 calls using tests in the testsuite that use IAX2.  These tests were great in that they quickly showed me that my changes were broken at first.  However, I have fixed the problems I could find and have the tests working again.
> 
> I have also run all of the scheduler unit tests provided by the test_sched module and they still pass.
> 
> 
> Thanks,
> 
> Russell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20101217/405e0cc2/attachment.htm>


More information about the asterisk-dev mailing list