Am Saturday 08 July 2006 07:24 schrieb Dmitry Torokhov:
> +/**
> + * list_get - get first element in a list
> + * @head: the head of your list
> + */
> +static inline struct list_head *list_get(struct list_head *head)
> +{
> + return head->next;
> +}
I would expect it to be more useful when combined with list_entry(),
something like
#define list_first_entry(list, type, member) \
container_of((list)->next, type, member)
#define list_last_entry(list, type, member) \
container_of((list)->prev, type, member)
Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]