[asterisk-dev] [asterisk-commits] mmichelson: trunk r125880 - /trunk/include/asterisk/lock.h

Kevin P. Fleming kpfleming at digium.com
Sat Jun 28 09:08:41 CDT 2008


SVN commits to the Asterisk project wrote:
> Author: mmichelson
> Date: Fri Jun 27 11:23:32 2008
> New Revision: 125880
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=125880
> Log:
> Optimization suggested by Russell to cache the value of pthread_self() so
> that it isn't evaluated every time through the loop.

Just an FYI... on Linux at least, pthread_self() is marked 'const' in
pthread.h, so the compiler will already perform this optimization itself.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list