[asterisk-dev] [Code Review] Fix how mutexes are created/destroyed on platforms which need constructors

Tilghman Lesher tlesher at digium.com
Fri Sep 3 13:33:54 CDT 2010



> On 2010-09-03 07:14:50, Kevin Fleming wrote:
> > This looks pretty good, although I'm a bit confused how this could be helping on a platform that has gcc 4.2 if the constructor priority attribute is only supported on gcc 4.3 and later.

In that case, I'm causing the destructor not to be defined for the CORE only.  It's not perfect, but it's a lot better than the prior behavior.  It eliminates most of the warnings, with the sole holdout being a destructor in chan_iax2.


> On 2010-09-03 07:14:50, Kevin Fleming wrote:
> > /branches/1.4/autoconf/ast_gcc_attribute.m4, line 1
> > <https://reviewboard.asterisk.org/r/894/diff/1/?file=12367#file12367line1>
> >
> >     Please call the second parameter "attribute_label" or something, since it's not an argument to the attribute.

Will do.


> On 2010-09-03 07:14:50, Kevin Fleming wrote:
> > /branches/1.4/include/asterisk/linkedlists.h, line 241
> > <https://reviewboard.asterisk.org/r/894/diff/1/?file=12371#file12371line241>
> >
> >     These macros should be undefined before leaving the HAVE_ATTRIBUTE_constructor_with_priority block.

Will do.


> On 2010-09-03 07:14:50, Kevin Fleming wrote:
> > /branches/1.4/include/asterisk/lock.h, line 817
> > <https://reviewboard.asterisk.org/r/894/diff/1/?file=12372#file12372line817>
> >
> >     Please use syntax consistent with what is already in the file... in this case, we have "#if defined(...)" followed by "#ifdef".

Changed.


- Tilghman


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


On 2010-09-02 23:42:31, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/894/
> -----------------------------------------------------------
> 
> (Updated 2010-09-02 23:42:31)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Checks for a new constructor argument, as of gcc 4.3, which allows priorities to be assigned to each constructor, thus indicating a construction order (ascending) and destructor order (descending).  Also removes the destructor for files in main, when priorities aren't available.
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/autoconf/ast_gcc_attribute.m4 284776 
>   /branches/1.4/configure UNKNOWN 
>   /branches/1.4/configure.ac 284776 
>   /branches/1.4/include/asterisk/autoconfig.h.in 284776 
>   /branches/1.4/include/asterisk/linkedlists.h 284776 
>   /branches/1.4/include/asterisk/lock.h 284776 
>   /branches/1.4/main/Makefile 284776 
> 
> Diff: https://reviewboard.asterisk.org/r/894/diff
> 
> 
> Testing
> -------
> 
> Eliminates some of the warnings on OS X 10.6 (gcc 4.2) upon quit, as mutexes don't get destroyed too early.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list