login
Header Space

 
 

Re: [patch 1/3] new timerfd API - new timerfd API

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Davide Libenzi <davidel@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, Michael Kerrisk <mtk-manpages@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>
Date: Monday, September 24, 2007 - 4:26 am

Davide,

On Sun, 2007-09-23 at 15:49 -0700, Davide Libenzi wrote:

Can you please restructure the struct in a way which does not result in
padding by the compiler ?

struct timerfd_ctx {
	struct hrtimer tmr;
	ktime_t tintv;
	wait_queue_head_t wqh;
	u64 ticks;
	int expired;
	int clockid;
};


You need to use ctx->tmr.base->get_time() here, otherwise you might read
a stale time value (in case that CONFIG_HIGH_RES_TIMERS is off).


You really can avoid the goto here.

	tglx


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/3] new timerfd API - new timerfd API, Davide Libenzi, (Sun Sep 23, 6:49 pm)
Re: [patch 1/3] new timerfd API - new timerfd API, Thomas Gleixner, (Mon Sep 24, 4:26 am)
Re: [patch 1/3] new timerfd API - new timerfd API, Davide Libenzi, (Mon Sep 24, 11:42 am)
Re: [patch 1/3] new timerfd API - new timerfd API, Thomas Gleixner, (Mon Sep 24, 11:53 am)
speck-geostationary