FYI:C++ in the Linux Kernel

Discussion in 'C++' started by Steven T. Hatton, May 26, 2005.

  1. http://netlab.ru.is/exception/LinuxCXX.shtml
    We have implemented a complete kernel level run-time support for C++ in the
    Linux kernel. In particular our run-time support enables the full use of
    C++ exceptions in the Linux kernel, but notably also includes support for
    global constructors and destructors, and dynamic type checking. Our kernel
    level support is based on open source commodity components, specifically
    the GNU gcc/g++ compiler and its exception implementation, the C++ ABI
    version independent standard interface.
    Currently only the i386 architecture is supported. Furthermore the kernel
    patch has only been tested with gcc version 3.3.3, and (with the 0.0.3
    release) 3.4.3

    ....

    --
    "If our hypothesis is about anything and not about some one or more
    particular things, then our deductions constitute mathematics. Thus
    mathematics may be defined as the subject in which we never know what we
    are talking about, nor whether what we are saying is true." - Bertrand
    Russell
    Steven T. Hatton, May 26, 2005
    #1
    1. Advertising

  2. Steven T. Hatton

    Rapscallion Guest

    Steven T. Hatton wrote:
    > http://netlab.ru.is/exception/LinuxCXX.shtml
    > We have implemented a complete kernel level run-time support for C++ in the
    > Linux kernel.


    For people who don't want to read the paper at your homepage you could
    answer some questions:

    > In particular our run-time support enables the full use of
    > C++ exceptions in the Linux kernel,


    What does this mean?

    > but notably also includes support for
    > global constructors and destructors, and dynamic type checking.


    What does this mean?

    > Our kernel
    > level support is based on open source commodity components, specifically
    > the GNU gcc/g++ compiler and its exception implementation, the C++ ABI
    > version independent standard interface.
    > Currently only the i386 architecture is supported. Furthermore the kernel
    > patch has only been tested with gcc version 3.3.3, and (with the 0.0.3
    > release) 3.4.3
    Rapscallion, May 26, 2005
    #2
    1. Advertising

  3. Steven T. Hatton wrote:

    > http://netlab.ru.is/exception/LinuxCXX.shtml
    > We have implemented a complete kernel level run-time support for C++ in the
    > Linux kernel. In particular our run-time support enables the full use of
    > C++ exceptions in the Linux kernel, but notably also includes support for
    > global constructors and destructors, and dynamic type checking. Our kernel
    > level support is based on open source commodity components, specifically
    > the GNU gcc/g++ compiler and its exception implementation, the C++ ABI
    > version independent standard interface.
    > Currently only the i386 architecture is supported. Furthermore the kernel
    > patch has only been tested with gcc version 3.3.3, and (with the 0.0.3
    > release) 3.4.3


    I think this would be better to be posted in Linux development newsgroups. True it may be
    interesting for non Linux-kernel developers too, but only for encyclopaedic reasons. :)




    --
    Ioannis Vranos

    http://www23.brinkster.com/noicys
    Ioannis Vranos, May 26, 2005
    #3
  4. Ioannis Vranos wrote:

    > Steven T. Hatton wrote:
    >
    >> http://netlab.ru.is/exception/LinuxCXX.shtml
    >> We have implemented a complete kernel level run-time support for C++ in
    >> the Linux kernel. In particular our run-time support enables the full use
    >> of C++ exceptions in the Linux kernel, but notably also includes support
    >> for global constructors and destructors, and dynamic type checking. Our
    >> kernel level support is based on open source commodity components,
    >> specifically the GNU gcc/g++ compiler and its exception implementation,
    >> the C++ ABI version independent standard interface.
    >> Currently only the i386 architecture is supported. Furthermore the
    >> kernel
    >> patch has only been tested with gcc version 3.3.3, and (with the 0.0.3
    >> release) 3.4.3

    >
    > I think this would be better to be posted in Linux development newsgroups.
    > True it may be interesting for non Linux-kernel developers too, but only
    > for encyclopaedic reasons. :)
    >


    I posted it here for a variety of reasons. I believe it is relevant to how
    C++ is, and can be used. Compare the opinions of the authors of the
    article I referred to, and this opinion:

    "In fact, in Linux we did try C++ once already, back in 1992. It sucks.
    Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.
    "The fact is, C++ compilers are not trustworthy. They were even worse in
    1992, but some fundamental facts haven't changed: 1) the whole C++
    exception handling thing is fundamentally broken. It's _especially_ broken
    for kernels. 2) any compiler or language that likes to hide things like
    memory allocations behind your back just isn't a good choice for a kernel.
    3) you can write object-oriented code (useful for filesystems etc) in C,
    _without_ the crap that is C++." - Linus Torvalds
    --
    "If our hypothesis is about anything and not about some one or more
    particular things, then our deductions constitute mathematics. Thus
    mathematics may be defined as the subject in which we never know what we
    are talking about, nor whether what we are saying is true." - Bertrand
    Russell
    Steven T. Hatton, May 27, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Don
    Replies:
    1
    Views:
    5,585
    Victor Bazarov
    Feb 8, 2004
  2. gooch

    linux kernel system call

    gooch, Oct 6, 2003, in forum: C Programming
    Replies:
    3
    Views:
    379
  3. yogesh
    Replies:
    3
    Views:
    574
    Kenny McCormack
    Feb 12, 2006
  4. Replies:
    3
    Views:
    157
  5. Lars Gierth
    Replies:
    6
    Views:
    212
    David Masover
    Mar 20, 2010
Loading...

Share This Page