Re: Linux/Pro -- clusters

H. Peter Anvin (hpa@zytor.com)
7 Dec 2001 19:42:47 -0800


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/