asterisk/main
Richard Mudgett 2e834f7d36 Astobj2 locking enhancement.
Add the ability to specify what kind of locking an ao2 object has when it
is allocated.  The locking could be one of: MUTEX, RWLOCK, or none.

New API:

ao2_t_alloc_options()
ao2_alloc_options()
ao2_t_container_alloc_options()
ao2_container_alloc_options()

ao2_rdlock()
ao2_wrlock()
ao2_tryrdlock()
ao2_trywrlock()

The OBJ_NOLOCK and AO2_ITERATOR_DONTLOCK flags have a slight meaning
change.  They no longer mean that the object is protected by an external
mechanism.  They mean the lock associated with the object has already been
manually obtained by one of the ao2_lock calls.  This change is necessary
for RWLOCK support since they are not reentrant.  Also an operation on an
ao2 container may require promoting a read lock to a write lock by
releasing the already held read lock to re-acquire as a write lock.


Replaced API calls:

ao2_t_link_nolock()
ao2_link_nolock()
ao2_t_unlink_nolock()
ao2_unlink_nolock()

with the respective

ao2_t_link_flags()
ao2_link_flags()
ao2_t_unlink_flags()
ao2_unlink_flags()

API calls to be more flexible and to allow an anticipated enhancement to
control linking duplicate objects into a container.


The changes to format.c and format_cap.c are taking advantange of the new
ao2 locking options to simplify the use of the format capabilities
containers.

Review: https://reviewboard.asterisk.org/r/1554/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 18:15:34 +00:00
..
editline Add gar to the check for AR for those silly OSes (Solaris) that don't have ar. 2010-04-27 21:13:01 +00:00
stdtime Re-commit the verbose branch. 2012-02-14 20:27:16 +00:00
abstract_jb.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
acl.c Avoid cppcheck warnings; removing unused vars and a bit of cleanup. 2012-02-08 20:49:48 +00:00
alaw.c Fix compile when certain G711 menuselect options are enabled. 2009-08-19 22:38:46 +00:00
aoc.c Opaquify channel stringfields 2012-01-24 20:12:09 +00:00
app.c Deprecated macro usage for connected line, redirecting, and CCSS 2012-02-27 16:50:19 +00:00
ast_expr2.c Add ABS() absolute value function to the expression parser. 2012-01-16 19:49:50 +00:00
ast_expr2.fl Avoid cppcheck warnings; removing unused vars and a bit of cleanup. 2012-02-08 20:49:48 +00:00
ast_expr2.h Merged revisions 293197 via svnmerge from 2010-10-28 20:01:28 +00:00
ast_expr2.y Add ABS() absolute value function to the expression parser. 2012-01-16 19:49:50 +00:00
ast_expr2f.c Avoid cppcheck warnings; removing unused vars and a bit of cleanup. 2012-02-08 20:49:48 +00:00
asterisk.c Non-verbose output should always go to the remote console, regardless of the previous level. 2012-02-17 19:56:58 +00:00
asterisk.dynamics Remove the old stub files, preferring the optional_api method. 2010-07-14 20:48:59 +00:00
asterisk.exports.in Merged revisions 288640 via svnmerge from 2010-09-24 03:43:14 +00:00
astfd.c Merged revisions 228338 via svnmerge from 2009-11-06 15:42:46 +00:00
astmm.c Two more minor fixes due to constification 2009-05-22 16:53:41 +00:00
astobj2.c Astobj2 locking enhancement. 2012-02-28 18:15:34 +00:00
audiohook.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
autochan.c Replace direct access to channel name with accessor functions 2012-01-09 22:15:50 +00:00
autoservice.c Merged revisions 278167 via svnmerge from 2010-07-20 22:26:23 +00:00
bridging.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
buildinfo.c fix a few small things found by using sparse 2008-10-30 16:49:02 +00:00
callerid.c Merged revisions 310636 via svnmerge from 2011-03-14 16:55:30 +00:00
ccss.c Deprecated macro usage for connected line, redirecting, and CCSS 2012-02-27 16:50:19 +00:00
cdr.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
cel.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
channel.c Fix ast_channel allocation init setting priority to -1 instead of 1. 2012-02-28 00:17:19 +00:00
channel_internal_api.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chanvars.c Add additional memory debugging to several core APIs, and fix several memory 2008-10-14 22:38:06 +00:00
cli.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
config.c Re-commit the verbose branch. 2012-02-14 20:27:16 +00:00
cygload.c Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
data.c Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff 2011-02-22 23:04:49 +00:00
datastore.c Merged revisions 273565 via svnmerge from 2010-07-01 22:16:23 +00:00
db.c Sort the output of 'database showkey' as well. 2012-01-16 17:12:36 +00:00
devicestate.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
dial.c Deprecated macro usage for connected line, redirecting, and CCSS 2012-02-27 16:50:19 +00:00
dns.c Fix a few compilation problems found when building Asterisk against uClibc. 2009-07-08 16:43:12 +00:00
dnsmgr.c Re-link peers by IP when dnsmgr changes the IP 2012-01-30 23:58:51 +00:00
dsp.c Replace direct access to channel name with accessor functions 2012-01-09 22:15:50 +00:00
ecdisa.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
enum.c Allow ENUM query functions to report lookup errors 2011-08-09 17:08:33 +00:00
event.c Merged revisions 337595,337597 via svnmerge from 2011-09-22 16:35:20 +00:00
features.c Deprecated macro usage for connected line, redirecting, and CCSS 2012-02-27 16:50:19 +00:00
file.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
fixedjitterbuf.c Fix various typos reported by Lintian 2010-07-02 15:57:02 +00:00
fixedjitterbuf.h Merged revisions 135841,135847,135850 via svnmerge from 2008-08-06 00:30:53 +00:00
format.c Astobj2 locking enhancement. 2012-02-28 18:15:34 +00:00
format_cap.c Astobj2 locking enhancement. 2012-02-28 18:15:34 +00:00
format_pref.c Eliminate unnecessary rebuilds of main/format*.c. 2012-01-25 16:54:54 +00:00
frame.c Implement the '!' negation element to negate codecs directly in the allow keyword. 2011-09-07 00:54:36 +00:00
framehook.c Fix some opaquification-related compiler warnings 2012-02-21 20:17:52 +00:00
fskmodem.c (Step 2 of 2) 2008-07-21 21:00:47 +00:00
fskmodem_float.c Merged revisions 316265 via svnmerge from 2011-05-03 20:45:32 +00:00
fskmodem_int.c Optionally build integer-based routines for FSK tone decoding (but default 2008-07-21 20:59:03 +00:00
global_datastores.c Add SRTP support for Asterisk 2010-06-08 05:29:08 +00:00
hashtab.c Add MALLOC_DEBUG to various utility APIs, so that memory leaks can be tracked back to their source. 2009-03-11 00:29:59 +00:00
heap.c Merged revisions 304950 via svnmerge from 2011-01-31 06:50:49 +00:00
http.c Fix TLS port binding behavior as well as reload behavior: 2012-02-02 18:55:05 +00:00
image.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
indications.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
io.c Merged revisions 182810 via svnmerge from 2009-03-18 02:28:55 +00:00
jitterbuf.c Merged revisions 174583 via svnmerge from 2009-02-10 18:16:31 +00:00
libasteriskssl.c Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
libasteriskssl.exports.in Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
loader.c Track module use count for res_calendar 2012-02-22 21:22:43 +00:00
lock.c Merged revisions 314358 via svnmerge from 2011-04-20 05:28:36 +00:00
logger.c Re-commit the verbose branch. 2012-02-14 20:27:16 +00:00
Makefile Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
manager.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
md5.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
message.c ast_channel opaquification of pointers and integral types 2012-02-20 23:43:27 +00:00
netsock.c Address comments from Mark Michelson 2012-02-27 17:03:46 +00:00
netsock2.c Merged revisions 332560 via svnmerge from 2011-08-18 21:39:04 +00:00
pbx.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
plc.c Merged revisions 316265 via svnmerge from 2011-05-03 20:45:32 +00:00
poll.c Merged revisions 285268 via svnmerge from 2010-09-07 19:09:08 +00:00
privacy.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
rtp_engine.c Deprecated macro usage for connected line, redirecting, and CCSS 2012-02-27 16:50:19 +00:00
say.c Opaquify channel stringfields 2012-01-24 20:12:09 +00:00
sched.c Some scheduler API cleanup and improvements. 2010-12-20 17:15:54 +00:00
security_events.c Merged revisions 337595,337597 via svnmerge from 2011-09-22 16:35:20 +00:00
sha1.c Update SHA1 code to RFC 6234 2011-10-11 19:06:29 +00:00
slinfactory.c Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff 2011-02-22 23:04:49 +00:00
srv.c Merged revisions 321392 via svnmerge from 2011-05-27 23:46:07 +00:00
strcompat.c Merged revisions 301263 via svnmerge from 2011-01-10 22:40:23 +00:00
strings.c fixes segfault on logging 2010-05-18 22:48:51 +00:00
stun.c Re-resolve the STUN address if a STUN poll fails for res_stun_monitor. 2011-12-01 21:19:41 +00:00
syslog.c Add functions to map syslog facilities and priorities constants to strings. 2009-06-26 13:00:35 +00:00
taskprocessor.c Audit of ao2_iterator_init() usage for v1.8. 2012-01-27 18:47:16 +00:00
tcptls.c Remove the few places where we try to ast_verbose() without a newline. 2011-11-30 23:38:34 +00:00
tdd.c Merge changes from str_substitution that are unrelated to that branch. 2009-04-01 20:13:28 +00:00
term.c Merged revisions 330108 via svnmerge from 2011-07-28 21:46:27 +00:00
test.c Remove "asterisk/version.h" in favor of "asterisk/ast_version.h". 2012-01-25 21:31:28 +00:00
threadstorage.c Fixed an issue in the threadstorage cli functions resulting from the constification of struct ast_cli_args in r196072. 2009-06-01 15:23:21 +00:00
timing.c Merged revisions 294278 via svnmerge from 2010-11-08 22:03:54 +00:00
translate.c Fix compiler warning. 2011-02-23 23:55:58 +00:00
udptl.c Prefer ast_set_qos() over ast_netsock_set_qos() 2012-02-27 14:13:58 +00:00
ulaw.c Fix compile when certain G711 menuselect options are enabled. 2009-08-19 22:38:46 +00:00
utils.c Use __alignof__ instead of sizeof for stringfield length storage. 2011-11-11 22:00:14 +00:00
xml.c Asterisk data retrieval API. 2010-04-22 18:07:02 +00:00
xmldoc.c Merged revisions 340109 via svnmerge from 2011-10-10 14:16:27 +00:00