[asterisk-dev] Proper use of locking.

Russell Bryant russell at digium.com
Fri Jul 20 15:21:26 CDT 2007


Michael Cargile wrote:
> This does not change the fact that there are a number of places within
> the Asterisk code where mutexes are being using sub-optimally. I am not
> trying to point fingers at anyone or say that anything has been
> mismanaged. All I want to see done is some effort put towards fixing
> these issues. I am more than willing to spend my free time fixing them
> and the company I am working for is planning on hiring someone full time
> to help improve the performance of Asterisk who can help with this as
> well. I would just like to see the 1.6 version of Asterisk being the
> most stable and best performing version of Asterisk to date so I can get
> rid of 1.2 and all of the back ports I am using.

Nobody is going to argue with you about Asterisk not being perfect.  We
would be more than happy to have you and anyone else involved in
development efforts.

"Code is louder than words".  Did someone famous say that?  I'm sure
someone did at some point ...

> I would also like to see a section added to the coding guidelines
> spelling out the proper use of mutexes in Asterisk so that new people
> joining in on the development do not fall into the same pitfalls. I am
> more than willing to write said section. There are already a number of
> sections in the coding guidelines that I feel should be self explanatory
> such as not recomputing values over and over again and never use an
> uninitialized variable. Adding something along the lines of avoiding
> doing I/O (either to a file, network adapter, or a terminal) while
> within as mutex where ever possible is just as important and would
> probably have a far more significant impact on performance.

If you'd like to write a section on this, that would be welcome.  Just
post it to http://bugs.digium.com/ and it can be merged.

-- 
Russell Bryant
Software Engineer
Digium, Inc.



More information about the asterisk-dev mailing list