摘要:
4个PDF在这(with notes):/Files/super119/CodingStyle.pdf/Files/super119/HOWTO.pdf/Files/super119/stable_api_nonsense.pdf/Files/super119/stable_kernel_rules.pdfCoding styles最有价值,然后是stable API nonsense,然后是HOWTO和stable kernel rules. 阅读全文
摘要:
Linux kernel的宏:#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))为什么不会segment fault?因为没有访问那个f。一旦有访问,就会segment fault,比如:#include <stdio.h>struct a{ int f;};void test_func(int f){ // printf("f is: %d\n", f); return;}int main(){ test_func(((struct a *)0)->f); return 0;}这里main里面尝试将f的值 阅读全文