By user12619391 on Jun 22, 2005
Though much of the OpenSolaris kernel is well commented (or at least, clearly implemented), there are a few files where we have gone out of our way to describe the big picture... or explain the subtle details. Sometimes called "Big Theory Statements", these descriptions usually take the form of a huge block comment near the top of a file and can be read from start to finish. I often point new hires eager to learn more about the kernel to these as straight-up reading material. When friend with a penchant for reading source code mentioned this weekend that he spent some time in page.h, it occurred to me that many would appreciate a list of files they could curl up by the fire with.
For starters, I usually recommend checking out the implementations of our kernel synchronization primitives:
|turnstile.c||the foundation for synchronization objects that have owners|
The other well-documented files on my list hail from all corners of the kernel:
|cyclic.c||high resolution interval timers|
|errorq.c||kernel error queues|
|ipc.c||System V interprocess communication|
|page.h||all about pages|
|vmem.c||the foundation for kernel memory allocation|
I offer apologies in advance if I've left out your favorite (dev_rmscsi.c, though to be admired for its candor, doesn't qualify). Let me know and I'll add contenders to this list... and to my own.