Quoting r. Or Gerlitz <[EMAIL PROTECTED]>: > >>+/* 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.
Lets be explicit then, and give some actual information: /* NB: mutex_trylock returns 1 on success, down_trylock - 0 on success. */ Make sense? -- Michael S. Tsirkin Staff Engineer, Mellanox Technologies _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
