From owner-cvs-all Wed Dec 13 14:30: 7 2000 From owner-cvs-all@FreeBSD.ORG Wed Dec 13 14:30:01 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 6712137B400; Wed, 13 Dec 2000 14:30:00 -0800 (PST) Received: from modemcable213.3-201-24.mtl.mc.videotron.ca ([24.201.3.213]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0G5J00AJ12HYUR@falla.videotron.net>; Wed, 13 Dec 2000 17:29:58 -0500 (EST) Date: Wed, 13 Dec 2000 17:31:10 -0500 (EST) From: Bosko Milekic Subject: RE: cvs commit: src/sys/sys mbuf.h In-reply-to: To: John Baldwin Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -- 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