lkml.org 
[lkml]   [2001]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Linux/Pro -- clusters
Date
Followup to:  <UTC200112080150.BAA195557.aeb@cwi.nl>
By author: Andries.Brouwer@cwi.nl
In newsgroup: linux.dev.kernel
>
> Yes and no. If I am not mistaken there are three details:
>
> (i) Linus prefers to separate block and character devices.
> I agree that that makes the code a bit cleaner, but dislike
> the code duplication: the interface to user space, the allocation,
> deallocation, registering is completely identical for the two.
> But apparently Linus does not mind a little bloat if that avoids
> an ugly cast in two or three places.
>

I don't understand why you can't share this code. The main reason for
having different types is so you don't mix them up -- they are
separante namespaces, and shouldn't be mixed up. Having them be
different types makes the compiler enforce this.

If we were using C++ we could make a base class which contained the
common stuff. As it is, perhaps a substructure would do it.

-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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.030 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site