tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mbuf: atomic_inc_uint
On Wed Nov 24 2010 at 15:02:39 +0100, Christoph Egger wrote:
>
> Hi!
>
> Is there a reason to not use atomic_inc_uint
> in sys/kern/uipc_mbuf.c:m_ext_free(), line 1560 ?
Is there any reason to use it? The comment claims you're dropping the
last reference, so assuming the comment is true, there is no way another
thread could be mucking with the refcounter. It looks like the increment
just serves the purpose of being able to reuse the m_ext_free() interface.
(also notice the non-interlocked ext_refcnt == 1 check / adjustment above)
Home |
Main Index |
Thread Index |
Old Index