
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Alan Cox's remark at Fosdem
> That is what the assembler code should handle. In a modern kernel, if
> it is in C, it should not be tied to any one architecture.
>
> -Josh
(Hello from a recent lurker btw)
That's not really fair. For instance, x86 architectures have low memory
and high memory, a 2 level VM tree, small and large pages (sometimes);
anything written to support these memory structures is going to be x86
specific. That doesn't mean that you should be writing it in assembler.
I'm a firm believer that you should stick to C for as long as possible
when doing this sort of thing, providing you're not having to take into
account how the C has been compiled. So, for instance, it's acceptable to
write in C and call out only to change hardware and processor settings,
but if you're having to consider, for instance, how a structure is laid
out or what the stack frame looks like while you write your C then you
should have changed language. I suspect this rule is a bit too
nonspecific to hold in every case, but it's better than Josh's
suggestion...
Linux, from the early days, was written to be C with odd exceptions, even
though it was initially 386 only. I still think this was a good design
philosophy.
--
Ian.
Home |
Main Index |
Thread Index