Slashdot Mirror


C++ In The Linux kernel

An anonymous reader submits "A researcher at Reykjavik University Network Laboratory (netlab.ru.is) has just released a Linux patch allowing for complete kernel-level run-time support for C++ in the Linux kernel, including exceptions, dynamic type checking and global objects (with constructors and destructors) The implementation is based on the C++ ABI in GNU g++, but contains various kernel level optimizations, that reduces the cost of throwing exceptions by an order of magnitude, thus making C++ exceptions viable in several scenarios. Furthermore, the Linux module loader is extended to handle weak symbols in C++, so that dynamic type checking is reduced to a pointer comparison, in contrast to string comparison."

18 of 850 comments (clear)

  1. nice by Anonymous Coward · · Score: 5, Funny

    how long until c# is supported?

  2. More Confusion by OverlordQ · · Score: 4, Funny

    So what will we say the kernel is written in . . C? C+? CKernelRun?

    --
    Your hair look like poop, Bob! - Wanker.
    1. Re:More Confusion by M51DPS · · Score: 5, Funny

      The kernel will be written in Java for more cross-platform compatibility.

    2. Re:More Confusion by Tumbleweed · · Score: 4, Funny

      CKernelRun?

      a) CKernelCrash
      b) CKernelPatchNotGetAcceptedByLinus

      One or the other, I'm sure.

    3. Re:More Confusion by aled · · Score: 3, Funny

      that's an exception:

      throw new ExceptionPatchNotAccepted("Linus");

      --

      "I think this line is mostly filler"
    4. Re:More Confusion by frostfreek · · Score: 5, Funny

      And why not???

      With the GNU Compiler Collection able to generate machine code for Java, we'd be able to leverage all the things that Java excells at!
      Such as:



      umm....


      well,
      Oh forget it then.

  3. C++? by Anonymous Coward · · Score: 5, Funny

    Good now I can fire up my good old visual basic and hack the kernal with COM.

    1. Re:C++? by npietraniec · · Score: 3, Funny

      and I was just thinking... I wonder how long until someone makes a "I want to use visual basic" comment. That didn't take long. hilarious.

  4. Alright!! by 21chrisp · · Score: 5, Funny


    I'm sure the kernel developers will LOVE the idea of putting C++ in the kernel.

    1. Re:Alright!! by metalogic · · Score: 5, Funny

      I see your ID isn't a coincidence.

  5. Stillborn. Seriously by apankrat · · Score: 3, Funny

    Java on other hand ...

    Or better yet - Brainf*ck, my personal favourite :)

    --
    3.243F6A8885A308D313
  6. RMS by zoeith · · Score: 5, Funny

    RMS is probably turning over in his grave... oH! wait he's not dead!

    --
    Zoeith
    1. Re:RMS by IntergalacticWalrus · · Score: 3, Funny

      ...yet.

  7. fantastic ... by Anonymous Coward · · Score: 4, Funny

    what an incredibly awesome idea!!!

    i can't wait to try and debug virtual functions, copy constructors, and polymorphism over JTAG or BDM!!!!

    man thats gonna be fun ... my hats definitely off to this academic you have definitely spent your time wisely!!!!

    i always found C causes to much clutter in the linux kernel ... a real language will do us all good ...

    keep an eye for this in 3.0 ...

    Jim

  8. Here's what's coming up! by Le+Marteau · · Score: 3, Funny

    Support, within the kernel, for IE^H^HMozilla! It'll be perfectly safe! Trust us!

    --
    Mod down people who tell people how to mod in their sigs
  9. Who cares? by Anonymous Coward · · Score: 3, Funny

    My VB kernel works just fine for me.

  10. Re:call/cc by Dr.+Photo · · Score: 4, Funny

    Clean, but not clean enough. For true conceptual purity, you need lexical closures, call-by-name, monads, lambdas, cooperative microthreads (though of course these could be simulated by call/cc), message passing, introspection and serialization, nongenerative record types, one-shot and partial continuations, maybe a little prototype-based OOP for flavor, and of course if you add prototype-based OOP, you'll need generics that are specializable by object rather than class (as well as consider the case of whether a method specialized for a particular prototype object still applies to its descendents), not to mention considering how that would affect the implementation of a meta-object protocol and multiple inheritance.

    Once you've done all this, Linux will truly be ready for the desktop. (Assuming you axiomatize your language definition first, to get rid of unnecessary features like for loops).

  11. Re:Exceptions are suddenly viable? by shadowmatter · · Score: 3, Funny

    Even the Windows kernel developers rejected them as a bad idea.

    MS Developer #1: I was thinking we could put exceptions in the kernel.
    MS Developer #2: Are you insane? Why on earth would you want to do that? I don't think I've heard a stupider suggestion for a kernel addition.
    MS Developer #1: Really? Well uhh... how about we put an Internet browser in the kernel?
    MS Developer #2: FREAKIN BRILLIANT, let me call Bill.

    - sm