One of the several things over the years that has kept my nose firmly outside of the kernel
source tree is the strong and regular repugnance I feel when delving inside - I mean, look at
the number of ad-hoc calculations, bitshifts and whatnot mentioned in this article. Look at
the escalation of a simple bug into a major one by moving a single test to the end of the loop
How much of a size/performance win was gained in return for sacrificing nice, simple
abstractions (or even just a bunch of well documented macros!), and simple, readable loops?
I notice that the NetBSD kernel bears some of the same resemblance. I will quite shamelessly
say that my userland C code never has, nor ever will look as ugly, unreadable, or ultimately
undocumented as most of the code in kernel space. Is this part of the
genius-hacker-pissing-contest culture? I (nor my current employer) would ever hire someone
that wrote code like this.
Sorry, rant over. Perhaps I'm just a stupid noob, or perhaps I have a hint of professionalism.
I can never quite work that out.