Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Apr 2003 09:37:35 +0100
From:      Mark Murray <mark@grondar.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org
Subject:   Re: #include <sys/lock.h> and <sys/mutex.h> 
Message-ID:  <200304010837.h318bZ4j060918@grimreaper.grondar.org>
In-Reply-To: Your message of "Tue, 01 Apr 2003 10:22:30 %2B0200." <31464.1049185350@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp writes:
> My present predicament is that I will probably put a mutex in the
> bio queue which is defined in <sys/bio.h>, and so far, I've found
> 20 .c files where I need to add <sys/lock.h> and <sys/mutex.h> and
> I am not yet at a point where LINT compiles.
> 
> Do we have a plan for these in the future ?  I can see three obvious
> options:
> 
> A) define them leaf #includes, and #include them from the majority of
>    our .c files.
> 
> B) Include them nested from other .h files which need them, in my
>    case <sys/bio.h>
> 
> C) Include them nested from a central .h file like <sys/kernel.h>

Do you need the whole sys/lock.h and sys/mutex.h? Can you get by with
#including sys/_lock.h and/or sys/_mutex.h in sys/bio.h? And possibly
following up by adding the non-underscore variants in the hopefully
few places where they are actually needed.

M
--
Mark Murray
iumop ap!sdn w,I idlaH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304010837.h318bZ4j060918>