list_del()

来源:互联网 发布:淘宝 赣南脐橙 编辑:程序博客网 时间:2024/05/17 19:20
从entry所在的双向链表中将entry删除:
static inline void list_del(struct list_head *entry)
{
    __list_del(entry
->prev, entry->next);
    entry
->next = LIST_POISON1;
    entry
->prev = LIST_POISON2;
}


/*
 * These are non-NULL pointers that will result in page faults
 * under normal circumstances, used to verify that nobody uses
 * non-initialized list entries.
 
*/

#define LIST_POISON1  ((void *) 0x00100100)
#define LIST_POISON2  ((void *) 0x00200200)

0 0