Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 17:31:10 -0500 (EST)
From:      Bosko Milekic <bmilekic@technokratis.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/sys mbuf.h
Message-ID:  <Pine.BSF.4.21.0012131729490.24887-100000@jehovah.technokratis.com>
In-Reply-To: <XFMail.001213105244.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 13 Dec 2000, John Baldwin wrote:

> 
> On 13-Dec-00 Bosko Milekic wrote:
> > bmilekic    2000/12/12 21:13:03 PST
> > 
> >   Modified files:
> >     sys/sys              mbuf.h 
> >   Log:
> >   Eliminate a race in MEXTFREE(). The reference counter decrement and test
> >   was not atomic. We now make sure that we free the ext buf if the reference
> >   count is about to reach 0 but also make sure that nobody else has done it
> >   before us.
> >   
> >   While I'm here, change refcnt to u_int (from long). This fixes a compiler
> >   warning regarding use of atomic_cmpset_long on i386.
> 
> If you are using atomic_cmpset_long, then use u_long for the refcount instead
> of u_int please.  Eitehr that, or use atomic_cmpset_int.

	I don't know if you actually looked at the diff.

	I'm not using atomic_cmpset_long because strictly speaking, it
  doesn't exist on i386 (it's defined to just atomic_cmpset_int) and
  the compiler complains when you pass a long as the first argument to
  atomic_cmpset_int.
  	The refcnt is now of type u_int.


> -- 
> 
> John Baldwin <jhb@FreeBSD.org> -- 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/
> 
> 


  Bosko Milekic
  bmilekic@technokratis.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012131729490.24887-100000>