[openib-general] Re: [PATCH] mutex-backport: add mutex_trylock support

Or Gerlitz ogerlitz at voltaire.com
Sun Feb 19 04:55:22 PST 2006


Michael S. Tsirkin wrote:
> Quoting r. Or Gerlitz <ogerlitz at voltaire.com>:
>> +/* this function follows the spin_trylock() convention, so        *
>> + * it is negated to the down_trylock() return values! Be careful  */
>> +#define mutex_trylock(foo) !down_trylock(foo)

> "negated to the down_trylock() return values" probably means !down_trylock
> which is already obvious. So what does the comment mean?

the comment comes to warn people that a code that was using 
if(!down_trylock(foo)) need to be changed to if(mutex_trylock(foo)) and 
viseversa (code that was using if(down_trylock(foo)) etc) - that's all.

Or.





More information about the general mailing list