Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jun 2017 16:03:19 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: adding extern maxbcachebuf to param.h
Message-ID:  <20170618130319.GH2088@kib.kiev.ua>
In-Reply-To: <YTXPR01MB01891732246247B4A249C2E7DDC70@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>
References:  <YTXPR01MB01891732246247B4A249C2E7DDC70@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>

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

On Sun, Jun 18, 2017 at 12:36:59PM +0000, Rick Macklem wrote:
> My recent commit (r320062) broke the arm build when it added
> extern int maxbcachebuf;
> to sys/param.h. Although I don't understand the actual failure, I believe
> it is caused by arm/arm/elf_note.S including param.h and then using the
> ELFNOTE() macro.
> 
> As a temporary fix, I have committed r320070, which removes the definition
> from sys/param.h.
> This brings me to the question of how best to fix this?
> 1 - Just leave it the way it is now, where "extern int maxbcachebuf" isn't defined
>      in a generic include file and needs to be defined as above before use.
> 2 - Add "!defined(LOCORE)" to the definition of it in sys/param.h, which I believe
>      will also fix the problem.
> 3 - Put it in some other sys/*.h file which never gets included in assembler files.
>      What .h would be appropriate?

I think that sys/buf.h is the best match.
Hiding the extern under !LOCORE in the sys/param.h is the second solution,
but I like moving the definition to buf.h because param.h is widely used
and most of the users do not need this symbol.


help

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