Slashdot Mirror


Object Oriented Linux Kernel With C++ Driver Support

An anonymous reader writes: An effort underway called BOSS-MOOL, the Minimalistic Object Oriented Linux, is designing the Linux kernel with OOP and C++ driver support. Linus Torvalds' opinions on C++ have long been known while developers at the DOS Lab IIT Madras and CDAC Chennai feel redesigning the kernel with object oriented abstractions and C++ driver support will increase maintainability while reducing complexity of the kernel. It doesn't appear though the group will try to mainline these changes.

5 of 365 comments (clear)

  1. Re:Why do people still care about C++ for kernel d by BarbaraHudson · · Score: 2, Informative
    Can anyone really argue with this:

    C++ leads to really really bad design choices. You invariably start using the "nice" library features of the language like STL and Boost and other total and utter crap, that may "help" you program, but causes: - infinite amounts of pain when they don't work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it's not even funny)

    I *do* like the ability to free up resources in a c++ destructor, but as he points out, that's not something you want to rely on in system software. The c++ committee has java envy.

    --
    "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  2. Re:Why do people still care about C++ for kernel d by devent · · Score: 3, Informative

    You should not free up resources in a c++ destructor. I guess that is exactly what Linus meant with his quote.
    http://c2.com/cgi/wiki?BewareO...
    http://www.codingstandard.com/...
    C++ destructors can be used to deallocate any memory, or do other stuff that cannot go wrong. But they cannot be used to release any resources, like sockets, streams, files, connections, etc.

    --
    http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
  3. Linus is right by bms20 · · Score: 4, Informative
    Having spent all week analyzing (and debugging) the mentor graphics usb driver (musb) for the omap processor, I can categorically say that there are some seriously weak drivers in linux.

    I cannot see how introducing something like C++ will improve the situation. Changing the langauge doesn't get rid of evolutionary code, nor does it fix people's thinking. I can't fault the guys who evolved the musb driver into a working piece of code - the crux of the problems originate with the original Mentor documentation: Unavailable, poorly coverage of errata, poor detail on what the hardware block is doing.

    What is required for good drivers are:
    • *Careful programming
    • *Open driver review
    • *Open test suites
      • -For example, the ability to run a verification test to verify that the omap (beagle board) can perform reliable control channel transfers over usb when acting as a peripheral would have saved me a lot of pain.
      • -How about: "Does your RS232 interface work" - hook it to an open test rig, and verify that it can run reliably at 115200 baud for a week. You'd be surprised, but the omap will most likely fail this.

    If hardware vendors wish to compete for embedded linux systems, then they should promote their performance on how well they do on the open test suite with their linux drivers - not just on their arm core's performance.

    -bms

  4. Re:Why do people still care about C++ for kernel d by serviscope_minor · · Score: 5, Informative

    Like gcc, oh wait, not that is written in plain and simple c.

    You misspelled "was". The compiler was switched over to C++ a few versions ago and they're now using C++ features.

    --
    SJW n. One who posts facts.
  5. Re:Right buddy... by dfghjk · · Score: 3, Informative

    I recently had to rewrite a modestly sized embedded project from C++ to C because it became clear that I could not afford the space for the mandatory libraries in the binary.

    I did so by retaining the organizational concepts imposed by methods but made the implied "this" pointers explicit. I had to reorganize to undo the damage done by losing inheritance, virtual functions, etc. In a way, my biggest loss was losing overloading and templates. Those afforded elegant solutions that C doesn't match.

    When I was done my source code actually shrank and my output binary size was cut in half. In no way could anyone argue that the code became less maintainable or less readable. Execution was notably faster and there was none of the god-awful unknown code executing that I had no control of. Exception handling is gone as is RTTI. Good riddance. I love some things in C++ but, on the whole, it is very burdensome.