Re: Linux kernel modules development in C++

2000-10-03 Thread Vadim Lebedev
I'm attaching a module i'm using to write C++ drivers for linux 2.0.xx The following line goes into the Rules.make file %.o: %.cpp $(CC) -fno-exceptions -fno-rtti $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_DEBUG) -c -o $@ $< For me it is working really great the new.cpp file goes in my

Re: Linux kernel modules development in C++

2000-10-03 Thread Ralf Baechle
On Thu, Sep 28, 2000 at 12:11:56PM +0200, Igmar Palsenberg wrote: > > I don't want to take a position on the matter of C vs. C++ in the Linux > > kernel. However, I *have* done some realistic work to show that C++ does > > not inherently introduce bloat. (I do my embedded work in C++.) > > > >

Re: AW: Linux kernel modules development in C++

2000-09-30 Thread Johan Kullstam
Carsten Lang <[EMAIL PROTECTED]> writes: > Hi, > i don't want to start discussing the pros and cons of using C++ in kernel > development. > BUT: why do we blame people if they want to? several reasons 1) this thread keeps coming back on linux-kernel and various linux related usenet groups

Re: Linux kernel modules development in C++

2000-09-30 Thread Christoph Hellwig
James Sutherland <[EMAIL PROTECTED]> wrote: > On Fri, 29 Sep 2000, Daniel Phillips wrote: > That sounds likely to be a common case. Every real bookstore I've seen > lately has had books on C, C++, Linux, Windows etc. programming - I have > yet to see one with a since ANSI or IEEE document for sal

Re: Linux kernel modules development in C++

2000-09-29 Thread Alan Shutko
James Sutherland <[EMAIL PROTECTED]> writes: > OTOH, these standards documents aren't the most readable of text. Perhaps > a human-friendly explanation of the standard would be more widely read? The problem with a more human-friendly explanation of the standard is that then you're not reading th

Re: Linux kernel modules development in C++

2000-09-29 Thread James Sutherland
On Fri, 29 Sep 2000, Daniel Phillips wrote: > Marty Fouts wrote: > > My own opinion is that no, the nominal cost of standards documents has > > little to do with why programmers don't have complete and up to date > > definitions of the language. > > I can't change your opinion but I can tell you

Re: AW: Linux kernel modules development in C++

2000-09-29 Thread Horst von Brand
Carsten Lang <[EMAIL PROTECTED]> said: > i don't want to start discussing the pros and cons of using C++ in kernel > development. Right. > BUT: why do we blame people if they want to? Just because. > It is possible to produce stable and good C++ modules (i have one for a > framegrabber devic

RE: Linux kernel modules development in C++

2000-09-29 Thread Marty Fouts
I suspect that this discussion belongs off-list, because it apparently comes up frequently. But an observation from a Linux-Kernel "outsider": Multilanguage developement (meaning using more than one language in the product) makes any product harder to develop. Because Linux is in C originally f

Re: AW: Linux kernel modules development in C++

2000-09-29 Thread Jes Sorensen
> "Carsten" == Carsten Lang <[EMAIL PROTECTED]> writes: Carsten> Hi, i don't want to start discussing the pros and cons of Carsten> using C++ in kernel development. BUT: why do we blame people Carsten> if they want to? This is already covered in the 200 previous discussions about this - bas

AW: Linux kernel modules development in C++

2000-09-29 Thread Carsten Lang
Hi, i don't want to start discussing the pros and cons of using C++ in kernel development. BUT: why do we blame people if they want to? It is possible to produce stable and good C++ modules (i have one for a framegrabber device) and it is much easier to port already exsiting C++ drivers from w

Re: Linux kernel modules development in C++

2000-09-29 Thread Horst von Brand
Marty Fouts <[EMAIL PROTECTED]> said: [...] > This list provides, I believe, an example of a class of programmers who have > little interest in the standard definition of the language, since, I'm told, > the Linux kernel isn't written in a standard programming language, but, > rather, in a diale

Re: Linux kernel modules development in C++

2000-09-29 Thread Daniel Phillips
Marty Fouts wrote: > My own opinion is that no, the nominal cost of standards documents has > little to do with why programmers don't have complete and up to date > definitions of the language. I can't change your opinion but I can tell you a fact: this is the reason that *I* do not have a copy o

Re: Linux kernel modules development in C++

2000-09-29 Thread Horst von Brand
Marty Fouts <[EMAIL PROTECTED]> said: > From: Horst von Brand [mailto:[EMAIL PROTECTED]] > [snip] > > When Linux started, there was _no_ decent freeware C++ > > compiler around. > IMO, it was worse even than that. C++ itself hadn't stablized as a language > to the point where it would have be

RE: Linux kernel modules development in C++

2000-09-29 Thread Marty Fouts
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 29, 2000 3:39 AM > To: [EMAIL PROTECTED] > Subject: RE: Linux kernel modules development in C++ > > > But but but.. wasn't the very first C++ compilers

RE: Linux kernel modules development in C++

2000-09-29 Thread Marty Fouts
essage- > From: Daniel Phillips [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 29, 2000 1:16 AM > To: Marty Fouts > Subject: Re: Linux kernel modules development in C++ > > > Marty Fouts wrote: > > IMO, it was worse even than that. C++ itself hadn't > st

RE: Linux kernel modules development in C++

2000-09-29 Thread Justin . Skists
But but but.. wasn't the very first C++ compilers really just a preprocessor into standard C? I went to a advanced C course, a year or so ago, and the guy showed us how to write OO code in C that went a little beyond everyday encapsulation. At the end, he told us that that was the type of code th

Re: Linux kernel modules development in C++

2000-09-29 Thread Igmar Palsenberg
> > - C++ gives overhead. With something like a kernel that's unwanted. > > You pay for what you use, no less no more. C++ compilers don't generate > bloated code `per se' but, yes, it's easier to make mistakes that degenerate > into bloatedness. Agree. I never said that C++ was bad. I just u

Re: Linux kernel modules development in C++

2000-09-29 Thread Igmar Palsenberg
> > Nothing. What I was saying if you want some OO language in the kernel, C++ > > is the only option I guess. Mixing languages is a pain.. > > There is no such thing as "OO language". There is OO style and there are > ways to use it when you are writing in almost any language. And OO in C is > n

Re: Linux kernel modules development in C++

2000-09-29 Thread Daniel Phillips
Marty Fouts wrote: > IMO, it was worse even than that. C++ itself hadn't stablized as a language > to the point where it would have been wise to use on a kernel at that time. > > The language only really stablized in '99, I think. It's too soon to tell > whether it would be usable for kernel d

RE: Linux kernel modules development in C++

2000-09-28 Thread Marty Fouts
> -Original Message- > From: Horst von Brand [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 28, 2000 1:45 PM [snip] > When Linux started, there was _no_ decent freeware C++ > compiler around. IMO, it was worse even than that. C++ itself hadn't stablized as a language to the

Re: Linux kernel modules development in C++

2000-09-28 Thread Ragnar Hojland Espinosa
On Thu, Sep 28, 2000 at 04:44:55PM -0400, Horst von Brand wrote: > Ragnar Hojland Espinosa <[EMAIL PROTECTED]> said: > > On Thu, Sep 28, 2000 at 01:45:40AM +0200, Igmar Palsenberg wrote: > > Let's put it the other way... there aren't many people who know C++ > > around. Well, there are less peopl

Re: Linux kernel modules development in C++

2000-09-28 Thread Alexander Viro
On Fri, 29 Sep 2000, Daniel Phillips wrote: > Horst von Brand wrote: > > This is exactly what Linus meant when he said he doesn't want an in-kernel > > debugger: Dumb it down, and you select dumber hackers, and the result is a mess. > > So you must be in favor of removing all > comments from

Re: Linux kernel modules development in C++

2000-09-28 Thread Daniel Phillips
Horst von Brand wrote: > This is exactly what Linus meant when he said he doesn't want an in-kernel > debugger: Dumb it down, and you select dumber hackers, and the result is a mess. So you must be in favor of removing all comments from the kernel source, in order to select even less dumb hacke

Re: Linux kernel modules development in C++

2000-09-28 Thread Timur Tabi
** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Thu, 28 Sep 2000 16:44:55 -0400 > Right. And C++ was designed carefully along "you pay for what you use", so > with careful programming it should be no worse. OTOH, in C you _see_ the > costs [OK, maybe a hardened asm-fanatic will t

Re: Linux kernel modules development in C++

2000-09-28 Thread Horst von Brand
Ragnar Hojland Espinosa <[EMAIL PROTECTED]> said: > On Thu, Sep 28, 2000 at 01:45:40AM +0200, Igmar Palsenberg wrote: [...] > > - The're a lot more people that know C than C++ > Let's put it the other way... there aren't many people who know C++ > around. Well, there are less people who unders

Re: Linux kernel modules development in C++

2000-09-28 Thread Timur Tabi
** Reply to message from Martin Dalecki <[EMAIL PROTECTED]> on Thu, 28 Sep 2000 20:31:05 +0200 > Simple: The fact that G++ is constantly changing what it's generatign > even > between minor numbers: > > 1. Calling conventions. > 2. Name mungling. > 3. Construct semantics. > 4. Run time support

Re: Linux kernel modules development in C++

2000-09-28 Thread Martin Dalecki
Ragnar Hojland Espinosa wrote: > > On Thu, Sep 28, 2000 at 01:45:40AM +0200, Igmar Palsenberg wrote: > > Some arguments why not to use it in the kernel : > > > > - C++ gives overhead. With something like a kernel that's unwanted. > > You pay for what you use, no less no more. C++ compilers don'

Re: Linux kernel modules development in C++

2000-09-28 Thread Ragnar Hojland Espinosa
On Thu, Sep 28, 2000 at 01:45:40AM +0200, Igmar Palsenberg wrote: > Some arguments why not to use it in the kernel : > > - C++ gives overhead. With something like a kernel that's unwanted. You pay for what you use, no less no more. C++ compilers don't generate bloated code `per se' but, yes, i

Re: Linux kernel modules development in C++

2000-09-28 Thread Horst von Brand
Daniel Phillips <[EMAIL PROTECTED]> said: [...] > Well, I *like* using // for one line comments, and I *hate* having my > code obfuscated with extra declaration lines just because I can't > declare something in the middle of a block. Those are rather weak reasons for selecting one language over

Re: Linux kernel modules development in C++

2000-09-28 Thread Alexander Viro
On Thu, 28 Sep 2000, Igmar Palsenberg wrote: > To bad I don't have time to get the basic kernel code.. Would be a good > investment in time I guess. > > I assume the above struct holds pointers to the essential function > calls, with a NULL value if the're not overridden (defaults) ? See incl

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> Oh, I understand why #2 is necessary, that doesn't mean that I don't hear > people complain about it anyway. On a side note, I consider lack of a real > kernel debugger to be evidence for #1. But I don't want to kick that dead > horse again. Well, I'm one of those guys who never uses debugge

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> > Tell my teacher it's a good idea, he is telling otherwise :) > >Teaching people to UNDERSTAND and THINK in OO methods can help >in several problems. There is no absolute requirement that >final implementations are done in any sort of OO languages. > >.. any language with st

Re: Linux kernel modules development in C++

2000-09-28 Thread Alexander Viro
On Thu, 28 Sep 2000, Igmar Palsenberg wrote: > On Wed, 27 Sep 2000, Alexander Viro wrote: > > > > OO is indeed != C++. But since it's a relative if C, it's the most > > > suitable option to use in the kernel. > > > > What's wrong with C itself? > > Nothing. What I was saying if you want som

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> Just remember what another, quite famous, teacher told Linus about failing > him for the monolithic design of Linux if he took his OS class. Then look > around and search for the ukernel OSes he predicted would be ubiquitous > very soon afterwards... > > Don't believe what teachers say. Code s

Re: Linux kernel modules development in C++

2000-09-28 Thread Daniel Phillips
Igmar Palsenberg wrote: > > On Wed, 27 Sep 2000, Alexander Viro wrote: > > > > OO is indeed != C++. But since it's a relative if C, it's the most > > > suitable option to use in the kernel. > > > > What's wrong with C itself? > > Nothing. What I was saying if you want some OO language in the ke

Re: Linux kernel modules development in C++

2000-09-28 Thread Daniel Phillips
Igmar Palsenberg wrote: > > > > Timur Tabi wrote: > > > > The real advantage comes when you're writing a driver where the design is > > > > inherently object-oriented. I can't give an example in Linux... > > > > > > The VFS is inherently object-oriented. Each filesystem works by > > > overriding

Re: Linux kernel modules development in C++

2000-09-28 Thread Erik Mouw
On Thu, 28 Sep 2000 10:27:47 -0500, Timur Tabi wrote: > ** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Thu, 28 Sep > 2000 10:22:50 -0400 > >> Just remember what another, quite famous, teacher told Linus about failing >> him for the monolithic design of Linux if he took his OS cla

Re: Linux kernel modules development in C++

2000-09-28 Thread Horst von Brand
Timur Tabi <[EMAIL PROTECTED]> said: > ** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on > Wed, 27 Sep 2000 21:47:07 -0400 [...] > > Your compiler being? I for one wouldn't trust others, C++ is still very > > much in flux in gcc... > Watcom C/C++ 11.0b, which is soon going to be o

Re: Linux kernel modules development in C++

2000-09-28 Thread Timur Tabi
** Reply to message from Igmar Palsenberg <[EMAIL PROTECTED]> on Thu, 28 Sep 2000 12:29:06 +0200 (CEST) > No. I'm agains using subsets of languages. Use it all, or don't use it. I don't agree with you. After all, what you're saying is to use the features of a language even if it's not a good i

Re: Linux kernel modules development in C++

2000-09-28 Thread Timur Tabi
** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Thu, 28 Sep 2000 10:22:50 -0400 > Just remember what another, quite famous, teacher told Linus about failing > him for the monolithic design of Linux if he took his OS class. Then look > around and search for the ukernel OSes he pre

Re: Linux kernel modules development in C++

2000-09-28 Thread Timur Tabi
** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 21:47:07 -0400 > > Yes, it's more important, but I've looked at the assembly code that my > > C++ compiler generates, and it's very clean. In fact, when you're > > writing code that by design is OO, then using C++

Re: Linux kernel modules development in C++

2000-09-28 Thread Matti Aarnio
On Thu, Sep 28, 2000 at 12:13:44PM +0200, Igmar Palsenberg wrote: > On Wed, 27 Sep 2000, Alexander Viro wrote: > > > > > > OO design had nothing to do with OO implementation. I can design a system > > > totally in OO, and implement it in C. Really stupid thing to do I think, > > > but it's possibl

Re: Linux kernel modules development in C++

2000-09-28 Thread Alan Cox
> But I must support new/delete operators for dynamic memory allocation. > I have rewritten the operators but it don't compile fine. I don't know what g++ expects from these helper functions. I suspect kmalloc and kfree are the functions you need to wrap - To unsubscribe from this list: send th

Re: Linux kernel modules development in C++

2000-09-28 Thread Horst von Brand
Igmar Palsenberg <[EMAIL PROTECTED]> said: > On Wed, 27 Sep 2000, Alexander Viro wrote: [...] > > > OO design had nothing to do with OO implementation. I can design a system > > > totally in OO, and implement it in C. Really stupid thing to do I think, > > > but it's possible.. > > Try it somed

RE: Linux kernel modules development in C++

2000-09-28 Thread Abel Munoz Alcaraz
From: Alan Cox [mailto:[EMAIL PROTECTED]] Sent: miercoles, 27 de septiembre de 2000 23:01 To: Abel Munoz Alcaraz Cc: Linux Kernel Subject: Re: Linux kernel modules development in C++ > I have written the Windows platform version in C++ using Numega's tools > encapsulating the driver

Re: Linux kernel modules development in C++

2000-09-28 Thread Rik van Riel
On Thu, 28 Sep 2000, Igmar Palsenberg wrote: > > > OO design had nothing to do with OO implementation. I can design a system > > > totally in OO, and implement it in C. Really stupid thing to do I think, > > > but it's possible.. > > > > Try it someday. That's how VFS/VM/filesystems are done. >

Re: Linux kernel modules development in C++

2000-09-28 Thread Stephen Frost
* Igmar Palsenberg ([EMAIL PROTECTED]) wrote: > > Tell my teacher it's a good idea, he is telling otherwise :) Academics and reality don't tend to equate. :) Something to do with the world not exactly being perfect. The reality is, if you hadn't guessed, Linux is doing rather well. :)

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> (not that I'm defending C++ support in the kernel, but...) > > "We'd need all of C++, or nothing" is a bogus argument. It's perfectly > reasonable to want to use a subset of C++, since C++ is such an > all-inclusive language. No. I'm agains using subsets of languages. Use it all, or don't us

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> > Timur Tabi wrote: > > > The real advantage comes when you're writing a driver where the design is > > > inherently object-oriented. I can't give an example in Linux... > > > > The VFS is inherently object-oriented. Each filesystem works by > > overriding a few methods stored in function ta

Re: Linux kernel modules development in C++

2000-09-28 Thread Helge Hafting
Timur Tabi wrote: > But that applies to C code as well. In fact, the #2 gripe I hear about Linux > development is how the API's change so often and without any regard to existing > code that depends on it. (#1 gripe: the dearth of good development tools). I consider #2 an advantage. Interface

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
On Wed, 27 Sep 2000, Alexander Viro wrote: > > OO is indeed != C++. But since it's a relative if C, it's the most > > suitable option to use in the kernel. > > What's wrong with C itself? Nothing. What I was saying if you want some OO language in the kernel, C++ is the only option I guess. Mix

Re: Linux kernel modules development in C++

2000-09-28 Thread Igmar Palsenberg
> I don't want to take a position on the matter of C vs. C++ in the Linux > kernel. However, I *have* done some realistic work to show that C++ does > not inherently introduce bloat. (I do my embedded work in C++.) > > > > Of course, I write m

Re: Linux kernel modules development in C++

2000-09-28 Thread Jes Sorensen
> "Timur" == Timur Tabi <[EMAIL PROTECTED]> writes: Timur> ** Reply to message from [EMAIL PROTECTED] on Wed, 27 Sep Timur> 2000 16:15:31 -0500 >> But where's the advantage in using C++? Plain old C has served >> admirably in UNIX and Linux development since the very beginning. >> What more

Re: Linux kernel modules development in C++

2000-09-28 Thread Helge Hafting
Abel Munoz Alcaraz wrote: > > I want to develop a platform-independent driver (Windows 9x/NT/2000, Linux, > Mac OS,...). > I have written the Windows platform version in C++ using Numega's tools > encapsulating the driver code in classes. > More of this classes isn't OS specific and it work well

Re: Linux kernel modules development in C++

2000-09-28 Thread Jes Sorensen
> "Timur" == Timur Tabi <[EMAIL PROTECTED]> writes: Timur> ** Reply to message from Horst von Brand Timur> <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 16:50:12 -0400 >> A couple of points: >> >> - The kernel is C, mixing in C++ for no *real* good reason is just >> making it harder to work on.

Re: Linux kernel modules development in C++

2000-09-28 Thread Jes Sorensen
> "Timur" == Timur Tabi <[EMAIL PROTECTED]> writes: Timur> I haven't tried C++ in Linux drivers myself, but I assume it Timur> can't be any more difficult than what I had to do for OS/2. Timur> Five years ago (imagine that - OS/2 is years ahead of Linux in Timur> this regard), I hacked up a m

Re: Linux kernel modules development in C++

2000-09-27 Thread Peter Samuelson
[Igmar Palsenberg] > I think there was a thread about C++ in the kernel a while ago, I'll > see if I can find it. Understatement of the year Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at h

Re: Linux kernel modules development in C++

2000-09-27 Thread Horst von Brand
Timur Tabi <[EMAIL PROTECTED]> said: > Horst von Brand <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 16:50:12 -0400 > > I'd say it is important specifically in device drivers, and less so > > elsewhere ;-) > Yes, it's more important, but I've looked at the assembly code that my > C++ compiler generate

Re: Linux kernel modules development in C++

2000-09-27 Thread Mike Touloumtzis
On Thu, Sep 28, 2000 at 02:30:00AM +0200, Igmar Palsenberg wrote: > > > Again, you don't need to use exception handling in order to use C++. > > None of my C++ drivers use exception handling, and they don't need > > to. > > You implement C++, or you don't. I hate things only partially > implement

Re: Linux kernel modules development in C++

2000-09-27 Thread Andre Hedrick
> Well, people said the same thing to me when I started writing OS/2 drivers in > C++. Nowadays, it's very common for non-*nix operating systems, especially > Windows. > This design is inherently object-oriented. The old C code for audio drivers > was horribly convoluted. When I rewrote it i

Re: Linux kernel modules development in C++

2000-09-27 Thread Andre Hedrick
On 27 Sep 2000, Christoph Hellwig wrote: > Abel Mu?oz Alcaraz <[EMAIL PROTECTED]> wrote: > > Hi everybody, > > > I want to develop a linux kernel module in C++ but I don't find makefiles > > and/or sorce files examples to do this. > > Don't do that. > Search the list-archive for C++ and rea

Re: Linux kernel modules development in C++

2000-09-27 Thread Alexander Viro
On Thu, 28 Sep 2000, Daniel Phillips wrote: > Timur Tabi wrote: > > The real advantage comes when you're writing a driver where the design is > > inherently object-oriented. I can't give an example in Linux... > > The VFS is inherently object-oriented. Each filesystem works by > overriding a

Re: Linux kernel modules development in C++

2000-09-27 Thread Stephen Williams
[EMAIL PROTECTED] said: > Oops, typo! - -- Steve Williams"The woods are lovely, dark and deep. [EMAIL PROTECTED] But I have promises to keep, [EMAIL PROTEC

Re: Linux kernel modules development in C++

2000-09-27 Thread Alexander Viro
On Thu, 28 Sep 2000, Igmar Palsenberg wrote: > OO is indeed != C++. But since it's a relative if C, it's the most > suitable option to use in the kernel. What's wrong with C itself? > > - A _lot_ of the kernel code/design is inherently object-oriented. So > >pardon our collective scepti

Re: Linux kernel modules development in C++

2000-09-27 Thread Igmar Palsenberg
> Yep. > - OO != C++. It's a style of programming and while you can do OO in C++ >you can easily do it in other languages (or do non-OO in C++, indeed) OO is indeed != C++. But since it's a relative if C, it's the most suitable option to use in the kernel. > - A _lot_ of the kernel code/

Re: Linux kernel modules development in C++

2000-09-27 Thread Stephen Williams
> - C++ gives overhead. With something like a kernel that's unwanted. I don't want to take a position on the matter of C vs. C++ in the Linux kernel. However, I *have* done some realistic work to show that C++ does not inherently introduce bloat. (I do my embedded work in C++.)

Re: Linux kernel modules development in C++

2000-09-27 Thread Igmar Palsenberg
> > - C++ gives overhead. With something like a kernel that's unwanted. > > C++ gives an overhead only if you abuse it. The C++ code in my drivers does > nothing that the equivalent C doesn't also do, except that it's easier to read. It gives overhead. At least, a year ago with gcc. > > > -

Re: Linux kernel modules development in C++

2000-09-27 Thread Anton Altaparmakov
At 22:14 27/09/2000, Timur Tabi wrote: >** Reply to message from Alan Cox <[EMAIL PROTECTED]> on Wed, 27 Sep >2000 22:00:54 +0100 (BST) > > > > I have written the Windows platform version in C++ using Numega's tools > > > encapsulating the driver code in classes. > > > More of this classes isn't O

Re: Linux kernel modules development in C++

2000-09-27 Thread Alexander Viro
On Thu, 28 Sep 2000, Igmar Palsenberg wrote: > Some arguments why not to use it in the kernel : > > - C++ gives overhead. With something like a kernel that's unwanted. > - Things like exception handling is hard to do in a kernel. > - The're a lot more people that know C than C++ > > And I p

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from Igmar Palsenberg <[EMAIL PROTECTED]> on Thu, 28 Sep 2000 01:45:40 +0200 (CEST) > - C++ gives overhead. With something like a kernel that's unwanted. C++ gives an overhead only if you abuse it. The C++ code in my drivers does nothing that the equivalent C doesn't also

Re: Linux kernel modules development in C++

2000-09-27 Thread Mike Touloumtzis
On Wed, Sep 27, 2000 at 04:14:39PM -0500, Timur Tabi wrote: > > I don't think any OS supports exception handling in a driver. It > wouldn't make much sense, since there's no way for a driver to really > "exit" (which is the ultimate destination of the exception). > > By the way, new and delete ar

Re: Linux kernel modules development in C++

2000-09-27 Thread Igmar Palsenberg
> Well, people said the same thing to me when I started writing OS/2 drivers in > C++. Nowadays, it's very common for non-*nix operating systems, especially > Windows. You call windows an OS ?? I call it a bunch of function calls with way to many arguments written by a bunch of * that like

Re: Linux kernel modules development in C++

2000-09-27 Thread Daniel Phillips
Timur Tabi wrote: > The real advantage comes when you're writing a driver where the design is > inherently object-oriented. I can't give an example in Linux... The VFS is inherently object-oriented. Each filesystem works by overriding a few methods stored in function table structs. The MM is w

Re: Linux kernel modules development in C++

2000-09-27 Thread Daniel Phillips
Timur Tabi wrote: > > ** Reply to message from Alan Cox <[EMAIL PROTECTED]> on Wed, 27 Sep > 2000 22:00:54 +0100 (BST) > > > > I have written the Windows platform version in C++ using Numega's tools > > > encapsulating the driver code in classes. > > > More of this classes isn't OS specific and

Re: Linux kernel modules development in C++

2000-09-27 Thread Igmar Palsenberg
> Hi everybody, > > I want to develop a linux kernel module in C++ but I don't find makefiles > and/or sorce files examples to do this. > When I compile the module, the gcc shows a lot of warnings. > I have tried to use 'extern "C" {}' in my source files, but the result is > th

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from [EMAIL PROTECTED] on Wed, 27 Sep 2000 16:15:31 -0500 > But where's the advantage in using C++? Plain old C has served admirably in > UNIX and Linux development since the very beginning. What more can C++ offer > for driver development that outweighs the reduced accessi

Re: Linux kernel modules development in C++

2000-09-27 Thread Wayne . Brown
/Corporate/Altec) Subject: Re: Linux kernel modules development in C++ Well, that's not much of answer. It certainly doesn't mean anything to people who have port drivers with tens of thousands of lines of code, all in C++. I haven't tried C++ in Linux drivers myself, but I assume

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from Alan Cox <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 22:00:54 +0100 (BST) > > I have written the Windows platform version in C++ using Numega's tools > > encapsulating the driver code in classes. > > More of this classes isn't OS specific and it work well in any OS. > > And

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 16:50:12 -0400 > I'd say it is important specifically in device drivers, and less so > elsewhere ;-) Yes, it's more important, but I've looked at the assembly code that my C++ compiler generates, and it's very clea

Re: Linux kernel modules development in C++

2000-09-27 Thread Alan Cox
> I have written the Windows platform version in C++ using Numega's tools > encapsulating the driver code in classes. > More of this classes isn't OS specific and it work well in any OS. And do you rely on any exception throwing ? If you use no exceptions (including thus using new and other cons

Re: Linux kernel modules development in C++

2000-09-27 Thread Horst von Brand
Timur Tabi <[EMAIL PROTECTED]> said: > ** Reply to message from Tigran Aivazian <[EMAIL PROTECTED]> on Wed, 27 Sep > 2000 20:10:49 +0100 (BST) [...] > > at the bottom of each message there is a url to lkml FAQ - have you read > > it? It should say (I haven't read it myself but it _should_, Richa

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from Tigran Aivazian <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 20:10:49 +0100 (BST) > at the bottom of each message there is a url to lkml FAQ - have you read > it? It should say (I haven't read it myself but it _should_, Richard you > hear this? :) plainly that Linux (or any U

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from "Richard B. Johnson" <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 15:13:45 -0400 (EDT) > > I want to develop a linux kernel module in C++ but I don't find > > makefiles and/or sorce files examples to do this. > > > > Use the correct tool for the job. The Linux kernel use

Re: Linux kernel modules development in C++

2000-09-27 Thread Timur Tabi
** Reply to message from Horst von Brand <[EMAIL PROTECTED]> on Wed, 27 Sep 2000 15:31:51 -0400 > Your problem is that you can't use anything of C++ that needs runtime > support inside the kernel (there goes new() and friends), exception > handling is out of the question (bye, bye, throw() et al

Re: Linux kernel modules development in C++

2000-09-27 Thread Horst von Brand
=?iso-8859-1?Q?Abel_Mu=F1oz_Alcaraz?= <[EMAIL PROTECTED]> said: > I want to develop a linux kernel module in C++ but I don't find > makefiles and/or sorce files examples to do this. Your problem is that you can't use anything of C++ that needs runtime support inside the kernel (there goes

RE: Linux kernel modules development in C++

2000-09-27 Thread Abel Munoz Alcaraz
on because I want to do this. I want reuse a lot of code. Thanks. -Abel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Albert D. Cahalan Sent: miercoles, 27 de septiembre de 2000 21:10 To: Abel Munoz Alcaraz Subject: Re: Linux kernel modules develo

Re: Linux kernel modules development in C++

2000-09-27 Thread Tigran Aivazian
On Wed, 27 Sep 2000, Tigran Aivazian wrote: > Hi Abel, > > at the bottom of each message there is a url to lkml FAQ - have you read > it? It should say (I haven't read it myself but it _should_, Richard you > hear this? :) plainly that Linux (or any UNIX) kernel development in C++ > is a very ba

Re: Linux kernel modules development in C++

2000-09-27 Thread Richard B. Johnson
On Wed, 27 Sep 2000, [iso-8859-1] Abel Muñoz Alcaraz wrote: > Hi everybody, > > I want to develop a linux kernel module in C++ but I don't find > makefiles and/or sorce files examples to do this. > Use the correct tool for the job. The Linux kernel uses 'C' and assembly. Cheers, Dick Jo

Re: Linux kernel modules development in C++

2000-09-27 Thread Tigran Aivazian
Hi Abel, at the bottom of each message there is a url to lkml FAQ - have you read it? It should say (I haven't read it myself but it _should_, Richard you hear this? :) plainly that Linux (or any UNIX) kernel development in C++ is a very bad idea and explain why. Because C++ is not yet a mature p

Re: Linux kernel modules development in C++

2000-09-27 Thread Christoph Hellwig
Abel Mu?oz Alcaraz <[EMAIL PROTECTED]> wrote: > Hi everybody, > I want to develop a linux kernel module in C++ but I don't find makefiles > and/or sorce files examples to do this. Don't do that. Search the list-archive for C++ and read why. Christoph -- Always remember that you

Linux kernel modules development in C++

2000-09-27 Thread Abel Muñoz Alcaraz
Hi everybody, I want to develop a linux kernel module in C++ but I don't find makefiles and/or sorce files examples to do this. When I compile the module, the gcc shows a lot of warnings. I have tried to use 'extern "C" {}' in my source files, but the result is the same on