linux
内核链表不是在链表节点中包含数据,而是在数据结构中包含链表节点。其在linux
内核中的定义为:
struct autofs {
char *name;
int len;
struct list_head list;
}
使用示例如下:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include "linux/fs.h"
#include <linux/slab.h>
#include <linux/list.h>
MODULE_LICENSE ( "GPL" );
struct student