Re: [TOMOYO #7 02/30] Internal functions prototypes for SAKURA andTOMOYO.

From: Daniel Walker
Date: Fri Apr 04 2008 - 11:29:51 EST



On Fri, 2008-04-04 at 21:22 +0900, Tetsuo Handa wrote:
> +/**
> + * list1_entry - get the struct for this entry
> + * @ptr: the &struct list1_head pointer.
> + * @type: the type of the struct this is embedded in.
> + * @member: the name of the list1_struct within the struct.
> + */
> +#define list1_entry(ptr, type, member) container_of(ptr, type,
> member)
> +
> +/**
> + * list1_for_each - iterate over a list
> + * @pos: the &struct list1_head to use as a loop cursor.
> + * @head: the head for your list.
> + */
> +#define list1_for_each(pos,
> head) \
> + for (pos = (head)->next; prefetch(pos->next), pos !=
> (head); \
> + pos = pos->next)
> +

These should go into include/linux/list.h .. It looks like you are
duplicate at least some of what is already in there..

Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/