About head of kernel linked list structure
Mulyadi Santosa
mulyadi.santosa at gmail.com
Mon May 11 00:45:00 EDT 2015
On Sat, May 9, 2015 at 6:05 AM, Jeff Haran <Jeff.Haran at citrix.com> wrote:
>
> Just pointing out that these lists are circular. Back in the old days we
> used to call them "rings".
>
>
>
> From list.h:
>
>
>
> 183 /**
>
> 184 * list_empty - tests whether a list is empty
>
> 185 * @head: the list to test.
>
> 186 */
>
> 187 static inline int list_empty(const struct list_head *head)
>
> 188 {
>
> 189 return head->next == head;
>
> 190 }
>
>
>
> Jeff Haran
>
>
>
After re-reading the page about linked list in kernelnewbies, I agree it's
circular list. I just didn't realize that even after reading carefully the
first post
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150511/e8abfbe4/attachment.html
More information about the Kernelnewbies
mailing list