3 ms·
And to be clear, unlike Linux, the NetBSD code that runs on (eg) a Vax is from the same codebase than runs on an 8-way amd64... versus (afaik) Linux where ea. t
by caf 12y ago
And to be clear, unlike Linux, the NetBSD code that runs on (eg) a Vax is from the same codebase than runs on an 8-way amd64... versus (afaik) Linux where ea. target is pretty much a rewrite.
That is not really an accurate way to characterise how the different Linux target architectures are supported in the source. As you would expect, the vast majority of the code is in fact shared.
- justincormack 12y agoNo it is not entirely accurate, but the Linux situation is very frustrating, with some functions not being supported in different architectures, random different header differences (ugh, mips) etc.
- bch 12y agoAgreed -- and people are proud (NetBSD) or defensive (Linux) of the characterization I made -- and while of course every single line isn't re-written, and presumably Linux kernal devs will talk to ea. other, or perhaps one person maintains multiple architectures and therefore gets automatic code/idea sharing, NetBSD goes through pains to make sure all the supported platforms' origin is the one, single repository that is NetBSD.
- caf 12y agoThat's really not how it is. For example, here the one single implementation of the madvise() syscall in Linux: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/mm/madvise.c?id=v4.0#n458 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.g... This entire file is compiled on all architectures with MMUs (madvise() is pointless on architectures without MMUs and hence without virtual memory). Everything architecture-specific in this file is abstracted away by macros like PAGE_SIZE and PAGE_SHIFT.