On Tue, 29 Aug 2006 20:34:01 +0200 Martin Josefsson <[EMAIL PROTECTED]> wrote:
> On Tue, 2006-08-29 at 11:22 -0700, Stephen Hemminger wrote: > > > > Probably, you should do atomic_inc_and_test() here and restart lookup, > > > if it fails. > > > > > > Alexey > > > > atomic_inc_and_test is true iff result is zero, so that won't work. > > Wouldn't atomic_inc_not_zero() do what you want? > Yes, but that code looks more complex for the common case. It ends up doing a compare exchange and retrying. -- Stephen Hemminger <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html