我正在向Linux内核6.22添加系统调用.
#include <stddef.h>
#incldue <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/lists.h>
#include <asm-i386/uaccess.h>
asmlinkage long sys_mypstree(char* buffer2copy){
char* buffer = (char*)vmalloc(sizeof(buffer2copy));
...
}
Run Code Online (Sandbox Code Playgroud)
然后,当我创建内核时.它显示警告:隐式声明函数'vmalloc'.所以,我现在要做什么?