#include <sys/lock.h> and <sys/mutex.h>
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Apr 1 00:44:16 PST 2003
In message <200304010837.h318bZ4j060918 at grimreaper.grondar.org>, Mark Murray wr
ites:
>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.
I can probably get away with the _* versions, but I'd prefer to know
what our plans for this sort of situation actually is...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list