Re: [PATCH 1/5] select: add a timespec version of the timeout toselect/poll

From: Andrew Morton
Date: Fri Aug 29 2008 - 22:11:29 EST


On Fri, 29 Aug 2008 08:06:30 -0700 Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

> + memset(&end_time, 0, sizeof(end_time));

It's a bit dorkward using memset to clear out a structure which
zillions of code sites already know contains only two members.

It could be that two plain old writes is more efficient. (and it could
be that this is how the compiler implements the memset anyway?)

But I'd suggest that adding a new inlined timespec_zero(timespec*) or
timespec_set(timespec*,int,int) would be nicer.

--
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/