On Wed, Apr 18, 2007 at 09:22:20PM +0200, Tim Dijkstra wrote: > Luca Tettamanti <[EMAIL PROTECTED]> wrote: > > Well, it's possible to do something like this: > > > > int s2ram_default_do(void) { > > use /s/p/s > > } > > > > __attribute__((weak)) int s2ram_do(void) { > > return s2ram_default_do(); > > } > > > > and then in PPC code: > > > > int s2ram_do(void) { > > poke PMU; > > > > return s2ram_default_do(); > > } > > I must confess that I didn't know about these fancy weak-linking stuff, > learned something new;) To me it seems a bit overkill, but logically it > seems the OK, so be my guest...
For me, as a not-so-experienced C programmer, it is probably easier to understand why there is some ppc-specific code in main(), either #ifdef'd directly or simply where i know that this function is defined as NULL in the !PPC case. But i think i will also learn about this weak linking stuff if i actually need to, so i don't care too much which way we go either ;-) Greetings, Stefan -- Stefan Seyfried "Any ideas, John?" "Well, surrounding them's out." ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel