1. 程式人生 > >今天看了Linux 核心連結串列

今天看了Linux 核心連結串列

/* Insert a new entry between two known consecutive entries */
static inline void __list_add(struct list_head *fnew,struct list_head *prev, struct list_head *next)
{
    next->prev = fnew;
    fnew->next = next;
    fnew->prev = prev;
    prev->next = fnew;
}

這個地方我把new改成了fnew,不然專案裡面編譯不過去。