On Sun, 23 Mar 2008, Manish Katiyar wrote:
> On Sun, Mar 23, 2008 at 11:35 PM, Manish Katiyar <[EMAIL PROTECTED]> wrote:
> > Hmmm.... after seeing the list_del(), I was wondering if after
> > splicing the list, what seems to be more reasonable.
> >
> > Setting the prev and next pointers of head to NULL, or setting
> > them to LIST_POISON1 and LIST_POISON2 as these two seem to be the
> > ideal candidate as they are made to notify(tracked easliy) in case
> > of illegal access of list pointers.
> >
> > Robert your thoughts/comments ??
>
> Following the footsteps of list_del() and list_del_init(), i think
> we should have
>
> static inline void list_splice(struct list_head *list, struct list_head *head)
> {
> if (!list_empty(list)){
> __list_splice(list, head);
> list->next = LIST_POISON1;
> list->prev = LIST_POISON2;
> }
> }
>
> as the default behaviour of list_splice()
that *would* seem to be more consistent behaviour, but it's still not
clear what the point is of that link poisoning in the first place.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ