Because the field "pprev" holds the address of the "next" field in the previous node.
And *pprev = next; just like the prev->next = next; connect the two nodes in forward direction.
Hope it's helpful for you.
Hope it's helpful for you.
On Thu, Apr 8, 2010 at 1:58 PM, Onkar Mahajan <kern.devel@xxxxxxxxx> wrote:
I am not able to understand how the marked like skips the node n :
static inline void __hlist_del(struct hlist_node *n)
{
struct hlist_node *next = n->next;
struct hlist_node **pprev = n->pprev;
*pprev = next; <--------------------------------------------------- ????
if (next)
next->pprev = pprev;
}
in this case
static inline void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
prev->next = next;
}
It is clear ...
Please help.
Regards,
Onkar
--
Yours sincerely
ZhangMeng