On 12-Dec-00 Alfred Perlstein wrote:
> * John Baldwin <[EMAIL PROTECTED]> [001212 08:39] wrote:
>> 
>> On 12-Dec-00 Alfred Perlstein wrote:
>> > grr...
>> > 
>> > considering this:
>> > 
>> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>> > 
>> >#define MEXT_REM_REF(m) do {                        \
>> >     KASSERT((m)->m_ext.ref_cnt->refcnt > 0, ("m_ext refcnt < 0"));  \
>> >     atomic_subtract_long(&((m)->m_ext.ref_cnt->refcnt), 1);     \
>> > } while(0)
>> > 
>> > this:
>> > 
>> >#define MEXTFREE(m) do {                        \
>> >     struct mbuf *_mmm = (m);                    \
>> >                                     \
>> >     if (MEXT_IS_REF(_mmm))                      \
>> >         MEXT_REM_REF(_mmm);                 \
>> > 
>> >  
>> > is not mpsafe.  we _NEED_ some type that allows atomic dec and test
>> > for 0.
>> 
>> http://www.FreeBSD.org/~jhb/patches/refcount.patch
> 
> You do have a commit bit if I'm not mistaken. :)

I would like some feedback on it. :)  I guess I should really send it off to
-arch for a bikeshed slugfest.

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to