473,756 Members | 9,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FYI:C++ in the Linux Kernel

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

Jul 23 '05 #1
3 3336
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


Jul 23 '05 #2
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
Jul 23 '05 #3
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

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5882
by: bouchia.nazha | last post by:
Hello I have encountered a problem using tomcat, linux and ssl. My problem seem to be a JVM memory deallocation problem on Linux. This is my configuration: OS: Redhat7.2 Tomcat: 4.0 Jdk: 1.3.1_07
34
5096
by: Maboroshi | last post by:
Hello My question has to do with python and linux - I was interested in finding out what it would take to reimplement the Linux Kernel in python basically just taking the source code from linux and rewriting it in python Would this idea make sense to do - if so what would be the benefits of doing this and in what way would this not be a good idea Cheers
3
3879
by: gooch | last post by:
This is not really a general c question but here goes anyway. I am trying to add a system call to a kernel (redhat 2.4.18) for a class I am taking and I have done the following. in /usr/src/linux/include/asm/unistd.h I added #define __NR_myfunctionname number in /usr/src/linux/arch/i386/kernel/entry.S I added .long SYMBOL_NAME(sys_myfunctionname)
4
2697
by: rahul8143 | last post by:
hello, I have some inline declaration questions. 1)why new kernel 2.4.30 has intermediate function of __ instead of direct calling it? int ip_finish_output(struct sk_buff *skb) { return __ip_finish_output(skb); } and also __ip_finish_output is written as
27
3877
by: Mike | last post by:
Open source programs in general suck pretty bad also. Here are some loose facts regarding why projects like Linux, PHP, MYSQL, and other open source programs suck: - Linux is simply a clone of an operating system over 20 years old similar to DOS (Unix). That's ALL Linux is. The kernal was taken, decompiled, and stolen by Linus himself. That's a fact. Xerox should have sued, but at the during the early 1991, no one was really using Unix...
31
1805
by: arun | last post by:
I know it is a free compiler. But does it follow any standard? If so which standard is it? (Ansi, Ecma, etc?)
30
2047
by: HangEveryRepubliKKKan | last post by:
Ahahahaha.. Lets see if I get this Demented Lintard reasoning right. Vista is a failure becuase after 300 days after it's release, it only has 7.5% of the OS market while the Lintard OS, is a shashing success because after 18 years after being released it has less than 2% (and falling) of the OS market. In Lintard Land, left is right, and up is down. Big is small and black is white.
8
1690
by: anchitgood | last post by:
Hey, I have developed a project on C++, but under windows. But we have got to run it in an open source (LINUX). Can anyone tell me what features of C++ are not supported in Linux ? Like i have heard Linux doesn't support esception handling and destructors. Similarly what about strings and other C++ features (say class, inheritance etc.) ? Thank you
16
1865
by: Blubaugh, David A. | last post by:
To All, I was wondering if anyone has come across the issue of not being allowed to have the following within a Python script operating under Linux: time.sleep(0.0125) It appears that I am not allowed to have the object sleep. Has anyone encountered this specific issue before in the past?
0
10062
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9901
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8733
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7282
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5322
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3827
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.