On Thu, Sep 11, 2008 at 10:45 AM, walter harms <[EMAIL PROTECTED]> wrote:
> hi list,
> i tried to understand the halt code and found it hard because #ifdef
> obvouscated
> a lot of the code. I moved the wtmp stuff into its own function what made it
> easy
> for #ifdef.

I don't think it is as improvement, but applied it anyway.
Anything to make you happier ;)

> can someone take a look at the #ifdef magic for RB_HALT_SYSTEM ?
> 1. it seems RB_HALT is only used by netbsd.
> 2. init.c should have the same problem but simply defines RB_HALT_SYSTEM
>    when not found.
>
> IMHO 2. is not clever.

Hmm. In practice, I guess RB_HALT_SYSTEM is always defined corrently.

> size info:
>   text    data     bss     dec     hex filename
>    479       0       0     479     1df halt.o          /* org. BB 1.12 */
>    470       0       0     470     1d6 halt.o.new      /* rearraged code */

This is because the function is not inlined, and gcc
was able to not spill as many regs in main().
IOW: this is a compiler's artifact, other version of gcc
may act differently.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to