[coreboot] [PATCH] reentrant and .bss-less vsprintf

Stefan Reinauer stepan at coresystems.de
Tue May 26 16:15:11 CEST 2009


On 26.05.2009 15:58 Uhr, Patrick Georgi wrote:
> ron minnich schrieb:
>> Is it necessary to nest the function to fix this problem? Are you sure
>> no other function will ever need str_tx_byte?
>>   
> As far as I can see, the global variable is only used for
> communication between the two functions, of which one is a callback.
> By nesting the function, the variable can be local.
>
> The only alternative I see is to rewrite that part entirely.
> Unless the gcc maintainers plan to kill this extension, I see no
> reason not to use it.

That said, I believe we shouldn't make it a fashion. Some projects use
nested functions for everything.
In this case, a nested function is the most beautiful way to fix our
problem, though.

I like Myles' idea to write a bit more of a comment a lot, though.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list