[asterisk-dev] [Code Review] Scheduler API Cleanup and Improvements
Russell Bryant
reviewboard at asterisk.org
Fri Nov 19 19:05:30 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1007/
-----------------------------------------------------------
(Updated 2010-11-19 19:05:30.729961)
Review request for Asterisk Developers.
Changes
-------
Update testing done section - ran the scheduler unit tests.
Also update patch to fix build issues for the unit tests, and a fix for a bug caught by the unit tests.
Summary (updated)
-------
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 (updated)
-----
/trunk/channels/chan_gtalk.c 295711
/trunk/channels/chan_h323.c 295711
/trunk/channels/chan_iax2.c 295711
/trunk/channels/chan_jingle.c 295711
/trunk/channels/chan_mgcp.c 295711
/trunk/channels/chan_sip.c 295711
/trunk/channels/chan_skinny.c 295711
/trunk/channels/chan_unistim.c 295711
/trunk/channels/sip/dialplan_functions.c 295711
/trunk/channels/sip/include/globals.h 295711
/trunk/include/asterisk.h 295711
/trunk/include/asterisk/channel.h 295711
/trunk/include/asterisk/rtp_engine.h 295711
/trunk/include/asterisk/sched.h 295711
/trunk/include/asterisk/udptl.h 295711
/trunk/main/ccss.c 295711
/trunk/main/cdr.c 295711
/trunk/main/channel.c 295711
/trunk/main/dnsmgr.c 295711
/trunk/main/rtp_engine.c 295711
/trunk/main/sched.c 295711
/trunk/main/udptl.c 295711
/trunk/pbx/pbx_dundi.c 295711
/trunk/res/res_calendar.c 295711
/trunk/res/res_rtp_asterisk.c 295711
/trunk/res/res_rtp_multicast.c 295711
/trunk/res/res_stun_monitor.c 295711
/trunk/tests/test_sched.c 295711
Diff: https://reviewboard.asterisk.org/r/1007/diff
Testing (updated)
-------
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/20101120/b0c1ba5b/attachment.htm
More information about the asterisk-dev
mailing list