From owner-freebsd-smp Sun Jan 13 5:28:11 2002 Delivered-To: freebsd-smp@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id A77C237B404; Sun, 13 Jan 2002 05:28:07 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 82DC610DDFC; Sun, 13 Jan 2002 05:28:07 -0800 (PST) Date: Sun, 13 Jan 2002 05:28:07 -0800 From: Alfred Perlstein To: John Baldwin Cc: smp@freebsd.org, dillon@freebsd.org, tanimura@freebsd.org Subject: Re: fd locking. Message-ID: <20020113052807.R7984@elvis.mu.org> References: <20020112191645.J7984@elvis.mu.org> <20020113041019.P7984@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020113041019.P7984@elvis.mu.org>; from bright@mu.org on Sun, Jan 13, 2002 at 04:10:20AM -0800 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Alfred Perlstein [020113 04:10] wrote: > * Alfred Perlstein [020112 19:17] wrote: > > * John Baldwin [020112 19:00] wrote: > > > > Bruce is going to not like you for adding nested includes of sys/lock.h and > > > sys/mutex.h. Instead, add nested includes of sys/_lock.h and sys/_mutex.h, and > > > then add sys/lock.h and sys/mutex.h to the files that need them. > > > > Can this be delayed? > > I'll start on this. Ugh, what a pain! Basically I wind up with an annoying problem. I want fhold and fhold_locked to be inlines. However they use mutexes, _however_, they aren't used for the most part, __however__ a lot of people include these files... so basically this is hard to do: cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -g -nostdinc -I- -I. -I../../.. -I../../../dev -I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../../include -D_KERNEL -ffreestanding -include opt_global.h -fno-common -elf -mpreferred-stack-boundary=2 ../../../dev/sound/isa/ad1816.c In file included from ../../../dev/sound/pcm/sound.h:49, from ../../../dev/sound/isa/ad1816.c:29: ../../../sys/file.h: In function `fhold_locked': ../../../sys/file.h:152: warning: implicit declaration of function `mtx_assert' ../../../sys/file.h:152: `MA_OWNED' undeclared (first use in this function) ../../../sys/file.h:152: (Each undeclared identifier is reported only once ../../../sys/file.h:152: for each function it appears in.) ../../../sys/file.h: In function `fhold': ../../../sys/file.h:163: warning: implicit declaration of function `mtx_lock' ../../../sys/file.h:164: warning: nested extern declaration of `mtx_assert' ../../../sys/file.h:165: warning: implicit declaration of function `mtx_unlock' ugh. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message