4 ms·
Right but it's not about being portable in kernel development -- the entire thing you're building is in and of itself nonportable.
by Locke1689 16y ago
Right but it's not about being portable in kernel development -- the entire thing you're building is in and of itself nonportable.
- scott_s 16y agoErr, not really. You should be as portable as possible across different architectures. For example, on a 32-bit machine you can get away with using an unsigned int to represent an address, but that will break on a 64-bit machine. The fact that the Linux kernel works on such disparate architectures also works against your point.
- Locke1689 16y agoNo it's not portable C. We replicate code for different architectures. There are portable sections, true, but the entire kernel isn't portable. Look in the source directory to find the amd64/x86/ARM specific code. If you know how to make __asm__ __volatile__(...) portable I'd love to hear it.