Re: Multi-threading

Andi Kleen (ak@suse.de)
Wed, 13 Mar 2002 09:23:06 +0100


On Tue, Mar 12, 2002 at 11:51:29PM -0800, David Schwartz wrote:
>
> >Just it might change immediately afterwards if you don't remove the
> >object from public view first.
>
> If it was in public view, whatever held it in public view would be using it,
> and hence its use count could not drop to zero.

That's not correct at least in the usual linux kernel pattern of using
reference counts for objects. Hash tables don't hold reference counts,
only users do. If you think about it a hash table or global list holding
a reference count doesn't make too much sense.

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