From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: C++ and the kernel
Date: 9 Apr 2002 18:52:19 -0700 [thread overview]
Message-ID: <a905sj$dl7$1@cesium.transmeta.com> (raw)
In-Reply-To: <20020409122622.GN612@gallifrey> <Pine.LNX.3.95.1020409085537.4291B-100000@chaos.analogic.com>
Followup to: <Pine.LNX.3.95.1020409085537.4291B-100000@chaos.analogic.com>
By author: "Richard B. Johnson" <root@chaos.analogic.com>
In newsgroup: linux.dev.kernel
> >
> > Bollox!
> >
> > There are many places in the kernel that are actually very OO - look at
> > filesystems for example. The super_operations sturcture is in effect a
> > virtual function table.
>
> The file operations structure(s) are structures. They are not object-
> oriented in any way, and they are certainly not virtual. The code that
> manipulates them is quite physical and procedural, well defined, and
> visible to the rest of the kernel.
>
Again, bollocks. The file operation structures are vanilla vtbl
implementations of virtual functions. The fact that they're written
foo->f_ops->func(foo, ...);
instead of
foo->func(...);
makes absolutely no difference whatsoever.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
next prev parent reply other threads:[~2002-04-10 1:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-09 10:16 C++ and the kernel T. A.
2002-04-09 9:54 ` Martin Dalecki
2002-04-09 12:10 ` Richard B. Johnson
2002-04-09 12:26 ` Dr. David Alan Gilbert
2002-04-09 13:28 ` Richard B. Johnson
2002-04-09 14:00 ` Chris Friesen
2002-04-09 13:55 ` Sean Neakums
2002-04-09 14:00 ` Alexander Viro
2002-04-09 14:02 ` Michael Clark
2002-04-09 14:30 ` Rik van Riel
2002-04-10 1:52 ` H. Peter Anvin [this message]
2002-04-09 17:17 ` T. A.
2002-04-09 21:51 ` J. Dow
2002-04-09 23:11 ` Rui Sousa
2002-04-09 17:27 ` T. A.
2002-04-09 11:29 ` Erik Mouw
2002-04-09 16:21 ` Kurt Wall
-- strict thread matches above, loose matches on Subject: below --
2002-04-09 16:45 Sau Dan Lee
2002-04-09 16:51 Sau Dan Lee
2002-04-09 16:58 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='a905sj$dl7$1@cesium.transmeta.com' \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.