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

reviewboard at asterisk.org reviewboard at asterisk.org
Fri Nov 12 10:42:01 CST 2010


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

Review request for Asterisk Developers.


Summary
-------

This is a patch I found sitting around that I had done while traveling at some point.  It contains some cleanups to the scheduler API for trunk.

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_gtalk.c 294898 
  /trunk/channels/chan_h323.c 294898 
  /trunk/channels/chan_iax2.c 294898 
  /trunk/channels/chan_jingle.c 294898 
  /trunk/channels/chan_mgcp.c 294898 
  /trunk/channels/chan_sip.c 294898 
  /trunk/channels/chan_skinny.c 294898 
  /trunk/channels/chan_unistim.c 294898 
  /trunk/channels/sip/include/globals.h 294898 
  /trunk/include/asterisk.h 294898 
  /trunk/include/asterisk/channel.h 294898 
  /trunk/include/asterisk/rtp_engine.h 294898 
  /trunk/include/asterisk/sched.h 294898 
  /trunk/include/asterisk/udptl.h 294898 
  /trunk/main/ccss.c 294898 
  /trunk/main/cdr.c 294898 
  /trunk/main/channel.c 294898 
  /trunk/main/dnsmgr.c 294898 
  /trunk/main/rtp_engine.c 294898 
  /trunk/main/sched.c 294898 
  /trunk/main/udptl.c 294898 
  /trunk/pbx/pbx_dundi.c 294898 
  /trunk/res/res_calendar.c 294898 
  /trunk/res/res_rtp_asterisk.c 294898 
  /trunk/res/res_rtp_multicast.c 294898 
  /trunk/res/res_stun_monitor.c 294898 

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.


Thanks,

Russell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20101112/1b04a97d/attachment.htm 


More information about the asterisk-dev mailing list