Re: [patch] sys_epoll 0.14 ...

Davide Libenzi (davidel@xmailserver.org)
Tue, 29 Oct 2002 20:09:54 -0800 (PST)


On Tue, 29 Oct 2002, Andrew Morton wrote:

> I was referring to these guys:
>
> +#define list_first(head) (((head)->next != (head)) ? (head)->next: (struct list_head *) 0)
> +#define list_last(head) (((head)->prev != (head)) ? (head)->prev: (struct list_head *) 0)
> +#define list_next(pos, head) (((pos)->next != (head)) ? (pos)->next: (struct list_head *) 0)
> +#define list_prev(pos, head) (((pos)->prev != (head)) ? (pos)->prev: (struct list_head *) 0)
>
> if we are to add such things to list.h then lots of people need
> to hum and hah over them first and ask questions like "why doesn't
> it use list_empty?" ;)
>
> It would be better to recode epoll's list walks to use the existing
> list accessors.

Andrew, don't they better describe what you're actually doing instead of
the list_empty() trick ?

- Davide

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