I've been using ipodlinux on my ipod for half a year or so, and i like
it a lot. Naturally, I thought I would take a peak at the source to see
if i could tweak things, maybe add a couple of features, etc.
The code was really nice to read. I'm pretty good in C myself, but I saw
a lot of things that I haven't really familiarized myself with 100% -
namely heavy use of function pointers and also a lot of type definitions
and functions being prefixed with an _ underscore.
I'm developing on an arm platform as well, [ arm9 - we have an mmu ] and
I'd like to put together a similar sort of extensible platform, so that
one can write modules for new applications. I'm hoping that this binds
all of the components closer together, so that I can start focusing on
architectural / model-driven design.
I'd like to pose a few questions if possible:
1) what are some of the best uses of function pointers? (i've already
experimented with them in typedef structs, but not really anywhere else)
2) when you prefix a typedef or function with an _ , it prevents that
symbol from being added into the object's symbol table, right? What is
the advantage of this exactly?
3) in podzilla2, the PZ_MOD_INIT() macro is used to ... oddly enough...
initialize a module. When someone is using this method for module
design, what are the minimally required functions that the module must
"export" this way? init(), run(), cleanup() ?
4) Does this plugin method require that the podzilla binary is
recompiled every time a new module is added? If not, what are the key
mechanisms that podzilla uses to browse the plugin directory and insert
'objects' at runtime?