<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1554/">https://reviewboard.asterisk.org/r/1554/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers and David Vossel.</div>
<div>By rmudgett.</div>
<p style="color: grey;"><i>Updated Feb. 24, 2012, 7:46 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Addressed Kevin's comments.
Pushed many general astobj2.h documentation changes to trunk to make API changes with this patch easier to see.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description (updated)</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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 anticipated flags 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.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ran the ao2 unit tests.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/main/format_cap.c <span style="color: grey">(356796)</span></li>
<li>/trunk/main/format.c <span style="color: grey">(356796)</span></li>
<li>/trunk/include/asterisk/astobj2.h <span style="color: grey">(356796)</span></li>
<li>/trunk/include/asterisk/lock.h <span style="color: grey">(356796)</span></li>
<li>/trunk/main/astobj2.c <span style="color: grey">(356796)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1554/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>