#tyndur · 2009-10-24

54 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen

  1. taljethpcmattman1: I have committed a make doc target earlier this week that produces both an English and a German version of doxygen output
  2. taljethBut before we start translating the existing comments, I'd like to get some things right
  3. taljethThe first one is that I think that #ifdef CDI_STANDALONE and pedigree.cc should die
  4. taljethAnother thing that I think we're not really prepared for is hotplugging
  5. 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
  6. taljethpcmattman: It was meant to make things easier
  7. taljethWhat problems do you see with it?
  8. pcmattmanThe pedigree.cc's role is basically just to provide a wrapper around the entry point for our module interface
  9. pcmattmanWithout that file, we'd have to introduce Pedigree-specific lines into each driver's main.c, which I'd rather not do
  10. taljethRight. I'd prefer to move that to the regular interface
  11. taljethHm, do you need C++ in there or is C enough?
  12. pcmattmanC is enough
  13. pcmattmanThey are merely macros
  14. taljethWell then, where is the problem?
  15. pcmattmanThe macros are #define'd as variable definitions
  16. taljethInstead of your MODULE_* macros we would define a CDI_MODULE macro and in cdi.h you map it your own macros
  17. pcmattmanRight, I was about to say something similar
  18. pcmattmanIn which case I agree
  19. taljethThe intention was to have this CDI_MODULE macro everywhere instead of making it a special case for Pedigree
  20. pcmattmanMakes sense.
  21. taljethI was thinking of linking multiple drivers into one binary even for tyndur, so we could profit from it, too
  22. pcmattmanA win for all :)
  23. taljethThat basically the requirement I set for CDI changes ;-)
  24. taljeth*That's
  25. 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
  26. pcmattmanRight
  27. taljethOk, I think this was the easy part ;-)
  28. taljethYou are still using this additional field in cdi_device?
  29. pcmattmanI believe so
  30. taljethWe need to find a generic way for this, too
  31. pcmattmanThe "pDev" field, much like your "backdev" field
  32. pcmattmanWell, seeing as though "backdev" and "pDev" are both void*, would it not be possible to have something like "void *opaque"?
  33. pcmattmanThat can be used by the CDI implementation to handle OS-specific device information
  34. 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
  35. taljethIt's jsut that not every cdi_device is a PCI device, so we need to find the right abstraction here
  36. taljethMaybe some pointer to a generic bus thing, or something like that
  37. 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
  38. pcmattmanThat's just how we've done it though, it doesn't work so well outside of our project
  39. taljethRight, we don't have such a Device thing. We directly use the structures of CDI
  40. taljethWhich could mean that CDI needs somehting like your Device
  41. 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
  42. pcmattmanYup, which is basically what we do in Pedigree
  43. 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
  44. pcmattmanRight
  45. 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
  46. taljethOk, and XanClic will have to live with the results ;-)
  47. pcmattman:)
  48. pcmattmanI'll be back in an hour or so
  49. taljethOk
  50. pcmattmanBack
  51. taljethBack, too. Bit too late, it seems
  52. XanClicI'm on! *g*
  53. taljethOh, you mean v2 of the sound interface is ready for discussion? ;-)
  54. XanClicErrr...