|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] page_list_splice
> >Without this clause, I get a null-pointer (actually null+4)
> >dereference... I think I must be missing some basic
> >difference between normal list code and page_list code.
>
> The basic difference is that page_list_head has NULL pointers
> when empty,
> whereas 'normal' lists heads have pointers to itself. So as
> Keir already
> stated, yes, the second conditional is needed.
Thanks (Keir too) for the confirmation.
> >Anyway, could you take a look at the routine to see if
>
> The one question I would have is whether you indeed intend this to be
> an insertion at the head of the list - inserting at the tail
> would seem
> more natural. The 'normal' list accessors allow doing this by simply
> passing &head->prev as the second argument, but since the page lists
> aren't symmetric this cannot be done that way by the invoking
> code (and
> hence a suffix-less version of page_list_splice() would seem to more
> naturally splice to the end of the existing list, while if
> splicing to the
> beginning is indeed intended I'd favor calling it
> page_list_splice_head()
> or some such).
Good feedback. But I was just adapting the "official" (in
Xen and Linux) list.h list_splice() routine routine which
apparently inserts at the head. For my usage, head vs
tail doesn't matter.
Thanks,
Dan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|