linux/types.h

size_t time_t clock_t uint8_t uint16_t ...

linux/stddef.h

NULL true false offsetof

stdarg.h

Linux 内核中没有 stdarg.h 头文件(stdarg 是编译器内建的,所以不包含在内核中),要使用编译工具链中的 stdarg.h 头文件。

linux/ctype.h

isdigit、islower、isupper、tolower、toupper ...

linux/string.h

memcpy memmove memcmp memset

strcpy strlen strcat strstr strcmp strchr

strncpy strlcpy strnlen strncat strnstr strncmp strnchr

linux/printk.h

printk、vprintk

linux/uaccess.h

copy_to_user copy_from_user

linux/slab.h

kmalloc kzalloc krealloc kfree

linux/vmalloc.h

vmalloc vfree

linux/kernel.h

当包含 linux/kernel.h 时就间接包含了 stdarg.h(不在内核中)、linux/types.h、linux/types.h、linux/printk.h 等头文件

sprintf、snprintf、vsprintf、vsnprintf 也在这里定义