?? kernel.h
字號(hào):
/** 'kernel.h' contains some often-used function prototypes etc*//** 'kernel.h'定義了一些常用函數(shù)的原型等。*/// 驗(yàn)證給定地址開始的內(nèi)存塊是否超限。若超限則追加內(nèi)存。( kernel/fork.c, 24 )。void verify_area (void *addr, int count);// 顯示內(nèi)核出錯(cuò)信息,然后進(jìn)入死循環(huán)。( kernel/panic.c, 16 )。volatile void panic (const char *str);// 標(biāo)準(zhǔn)打?。@示)函數(shù)。( init/main.c, 151)。int printf (const char *fmt, ...);// 內(nèi)核專用的打印信息函數(shù),功能與printf()相同。( kernel/printk.c, 21 )。int printk (const char *fmt, ...);// 往tty 上寫指定長度的字符串。( kernel/chr_drv/tty_io.c, 290 )。int tty_write (unsigned ch, char *buf, int count);// 通用內(nèi)核內(nèi)存分配函數(shù)。( lib/malloc.c, 117)。void *malloc (unsigned int size);// 釋放指定對(duì)象占用的內(nèi)存。( lib/malloc.c, 182)。void free_s (void *obj, int size);#define free(x) free_s((x), 0)/** This is defined as a macro, but at some point this might become a* real subroutine that sets a flag if it returns true (to do* BSD-style accounting where the process is flagged if it uses root* privs). The implication of this is that you should do normal* permissions checks first, and check suser() last.*//** 下面函數(shù)是以宏的形式定義的,但是在某方面來看它可以成為一個(gè)真正的子程序,* 如果返回是true 時(shí)它將設(shè)置標(biāo)志(如果使用root 用戶權(quán)限的進(jìn)程設(shè)置了標(biāo)志,則用* 于執(zhí)行BSD 方式的計(jì)帳處理)。這意味著你應(yīng)該首先執(zhí)行常規(guī)權(quán)限檢查,最后再* 檢測suser()。*/#define suser() (current->euid == 0) // 檢測是否是超級(jí)用戶。
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -