Re: Unreliable Guide to Locking - Addition?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-08-08 at 18:41 +0530, Kedar Sovani wrote:
>     when the last atomic_dec_and_test() (the last == the one which
> returns 0) is being called on the object, the object is usually not
> accessible to others (list_del()) and hence the  simultaneous
> atomic_inc() call never occurs.

Yes, a reference count must count references.  Of course, you can get
around with with "atomic_dec_and_lock", but I hate that primitive as it
has scalability issues (it can't be translated to RCU).

I'll look and see if I can make this requirement explicit.

Thanks!
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux