本系列文章主要写我在阅读Linux内核过程中,关注的比较难以理解但又设计巧妙的代码片段(不关注OS的各个模块的设计思想,此部分我准备写在“深入理解Linux Kernel” 系列文章中),一来通过内核代码复习一下C语言及汇编语言的语法,二来学习内核开发大牛们书写代码的风格及思路. 在内核文件 include/linux/bug.h中,有下面两行的宏定义: 1 2 3 4 5 6 /* Force a compilation error if condition is true, but al…
Because there are numerous revisions and releases of the Linux kernel and new ones are developed at frequent intervals, it is important to have a system for clearly identifying them. A kernel is a program that constitutes the central core of a comput…