[U-Boot-Users] [PATCH] Functions added to extern for stand alone programs
Jeffrey Mann
mannj at embeddedplanet.com
Wed May 23 21:51:55 CEST 2007
> >
> > This #ifdef maze is too much even for my standards. And that does
> > mean something.
> >
> > Is there anybody out there with an idea how to avoid that?
>
> The cond_syscall() macro in the Linux kernel might be worth stealing.
> How about something like this?
>
> #define cond_extern(name) asm(".weak\t" #name "\n\t.set\t" #name ",
> unimpl_extern")
I do not understand what this does. Does it work?
> static int unimpl_extern(void)
> {
> return -ENOSYS; /* or something more appropriate */
> }
How is this different that using the dummy function?
> cond_extern(do_protect);
> cond_extern(do_flerase);
>
-Jeff
More information about the U-Boot
mailing list