All of lore.kernel.org
 help / color / mirror / Atom feed
* What is the role of LIST_POISON1 and LIST_POISON2?
@ 2016-03-04  5:02 Navy Cheng
  2016-03-04  7:07 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 4+ messages in thread
From: Navy Cheng @ 2016-03-04  5:02 UTC (permalink / raw)
  To: kernelnewbies

Hi,

When I read the code of list_del(), I find LIST_POISON1 and LIST_POISON2:

    static inline void list_del(struct list_head *entry)
    {
	__list_del(entry->prev, entry->next);
	entry->next = LIST_POISON1;
	entry->prev = LIST_POISON2;
    }

Why not set entry->next and entry->prev to NULL ?

Thank you!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-04 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04  5:02 What is the role of LIST_POISON1 and LIST_POISON2? Navy Cheng
2016-03-04  7:07 ` Valdis.Kletnieks at vt.edu
2016-03-04 13:01   ` Navy Cheng
2016-03-04 20:11     ` Vasu M

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.