#tyndur · 2009-10-24
54 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen
- taljethpcmattman1: I have committed a make doc target earlier this week that produces both an English and a German version of doxygen output
- taljethBut before we start translating the existing comments, I'd like to get some things right
- taljethThe first one is that I think that #ifdef CDI_STANDALONE and pedigree.cc should die
- taljethAnother thing that I think we're not really prepared for is hotplugging
- pcmattman1taljeth: "The first one is that I think that #ifdef CDI_STANDALONE and pedigree.cc should die" <-- That may make working with CDI in Pedigree significantly more complicated
- taljethpcmattman: It was meant to make things easier
- taljethWhat problems do you see with it?
- pcmattmanThe pedigree.cc's role is basically just to provide a wrapper around the entry point for our module interface
- pcmattmanWithout that file, we'd have to introduce Pedigree-specific lines into each driver's main.c, which I'd rather not do
- taljethRight. I'd prefer to move that to the regular interface
- taljethHm, do you need C++ in there or is C enough?
- pcmattmanC is enough
- pcmattmanThey are merely macros
- taljethWell then, where is the problem?
- pcmattmanThe macros are #define'd as variable definitions
- taljethInstead of your MODULE_* macros we would define a CDI_MODULE macro and in cdi.h you map it your own macros
- pcmattmanRight, I was about to say something similar
- pcmattmanIn which case I agree
- taljethThe intention was to have this CDI_MODULE macro everywhere instead of making it a special case for Pedigree
- pcmattmanMakes sense.
- taljethI was thinking of linking multiple drivers into one binary even for tyndur, so we could profit from it, too
- pcmattmanA win for all :)
- taljethThat basically the requirement I set for CDI changes ;-)
- taljeth*That's
- taljethAnd the CDI_STANDALONE really aligns well with it. Once we have the CDI_MODULE macro, we can move main() into the library, so we wouldn't need standalone modules any more
- pcmattmanRight
- taljethOk, I think this was the easy part ;-)
- taljethYou are still using this additional field in cdi_device?
- pcmattmanI believe so
- taljethWe need to find a generic way for this, too
- pcmattmanThe "pDev" field, much like your "backdev" field
- pcmattmanWell, seeing as though "backdev" and "pDev" are both void*, would it not be possible to have something like "void *opaque"?
- pcmattmanThat can be used by the CDI implementation to handle OS-specific device information
- taljethWell, I think a opaque field would make a lot of sense, but being able to access the pci_device is a useful thing not only for Pedigree
- taljethIt's jsut that not every cdi_device is a PCI device, so we need to find the right abstraction here
- taljethMaybe some pointer to a generic bus thing, or something like that
- pcmattmanIn Pedigree's case, an opaque pointer becomes a "Device", which can be anything from a PCI device to an ISA device to a virtual device node
- pcmattmanThat's just how we've done it though, it doesn't work so well outside of our project
- taljethRight, we don't have such a Device thing. We directly use the structures of CDI
- taljethWhich could mean that CDI needs somehting like your Device
- taljethActually, what we are missing in C is multiple inheritance. If you could cast a e1000 to a PCI device and not only to a netword card, this problem wouldn't exist
- pcmattmanYup, which is basically what we do in Pedigree
- taljethBut as long as you don't have a solution for this in C, we need to use a has-a instead of is-a for the association with a bus
- pcmattmanRight
- pcmattmanI would say your best bet is to implement it in such a way that it works for tyndur, and then I'll determine the best way to make it work for Pedigree
- taljethOk, and XanClic will have to live with the results ;-)
- pcmattman:)
- pcmattmanI'll be back in an hour or so
- taljethOk
- pcmattmanBack
- taljethBack, too. Bit too late, it seems
- XanClicI'm on! *g*
- taljethOh, you mean v2 of the sound interface is ready for discussion? ;-)
- XanClicErrr...