dect
/
asterisk
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
asterisk/build_tools
russell 89175b7e04 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 14:04:26 +00:00
..
cflags-devmode.xml Add debug flag so skinny debug will show information about packets. 2008-12-04 16:37:13 +00:00
cflags.xml Convert the ast_channel data structure over to the astobj2 framework. 2009-04-24 14:04:26 +00:00
embed_modules.xml clean up some patterns for files to remove 2009-04-10 16:51:44 +00:00
get_documentation Merge changes from team/group/appdocsxml 2008-11-01 21:10:07 +00:00
get_makeopts Merged revisions 139909 via svnmerge from 2008-08-25 21:32:10 +00:00
get_moduleinfo Merged revisions 139909 via svnmerge from 2008-08-25 21:32:10 +00:00
make_build_h Merged revisions 80330 via svnmerge from 2007-08-22 18:54:30 +00:00
make_buildopts_h Fix a few build problems on Solaris (and check for an md5 utility in 2008-11-19 00:27:45 +00:00
make_defaults_h Use the set ASTDBDIR as the default, too 2008-01-24 22:58:10 +00:00
make_linker_eo_script give embedded modules a helping hand by backing up and restoring their global variables when they are loaded and unloaded 2007-02-22 02:36:00 +00:00
make_sample_voicemail Merged revisions 50754 via svnmerge from 2007-01-13 16:47:01 +00:00
make_version Whitespace chages. 2009-03-12 01:33:04 +00:00
make_version_c Rename version.h to ast_version.h. Next, I will be re-adding version.h as an 2008-02-26 20:02:14 +00:00
make_version_h Re-add the automatically generated version.h, so that modules can include for 2008-02-26 20:19:03 +00:00
menuselect-deps.in remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC 2009-01-15 20:18:53 +00:00
mkpkgconfig Merged revisions 80330 via svnmerge from 2007-08-22 18:54:30 +00:00
prep_tarball make this script actually work 2008-08-13 23:00:37 +00:00