wiki1179: Kernel_source_guide (Version 88) | ||||||||
Quick Guide to the Kernel Source#The kernel and the process manager make up the operating system. They share the same address space. The kernel is non-threaded, and forces mutual-exclusion so that there is only ever one instance of it running, (even on SMP (small lie, see the SMP section)). The kernel "is entered" when anyone invokes a kernel call (or system call). The kernel runs in a privileged supervisor (or "ring0" in some architectures) state. The kernel only very rarely inhibits interrupts (and has an extensive and clever way of dancing out of the way of them). The most notable invoker of the kernel is the process manager or "proc". Where is the Kernel Source?#How do I checkout and build the source?#Actually, one always builds the kernel and the process manager together:Where are the good bits?#Footnotes (1) The embedded memory manager is only used when the OS is built as a stand-alone executive, i.e. without the process manager. QNX never ships it that way. So the emm_* files are generally not used. The nominal memory manager is in the process manager. (2) The memory manager implementation is located in proc. It overrides these stubs in the kernel. (3) Actually there is SMP support scattered throughout the kernel. Look for #if defined(VARIANT_smp). Kernel modules, which aren't allowed to have compile variants, will test NUM_PROCESSORS or runmask instead. (4) How we enter and exit the kernel is described here. (5) There is no footnote 5. (6) Fixme: wth are minidrivers Where the heck is the implementation of KernelCall()? #You won't find it by grepping. To find the implementation of a kernel call spelled like CamelCaseKernelCall, look for a function ker_camel_case_kernel_call. For example the SchedCtl() kernel call is implemented by ker_sched_ctl(). How the invocation seqence works is described here. What are the file naming conventions?#
|
||||||||
Versions | Associations | Attachments | Back Links | |||||||