[lkml]   [2003]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Synchronous signal delivery..
Davide Libenzi <> writes:

> On Thu, 13 Feb 2003, Linus Torvalds wrote:
> > > > One of the reasons for the "flags" field (which is not unused) was because
> > > > I thought it might have extensions for things like alarms etc.
> > >
> > > I was thinking more like :
> > >
> > > int timerfd(int timeout, int oneshot);
> >
> > It could be a separate system call, ...
> I would personally like it a lot to have timer events available on
> pollable fds. Am I alone in this ?

Think of "timer events" as a single TCP connection, so you have...

time X: empty
time X+Y: timed event "Arrives"
time X+Z: timed event "Arrives" which point it's pretty obvious that if you "poll" the timer
event queue from anytime before X+Y it'll be empty, and anytime after
X+Y it'll be "full". There isn't any point in being able to distinguish
between the events X+Y and X+Z, you only need to know a timed event has
occurred so you should process all timed events that are needed.
At which point you just need to work out the difference between X and
X+Y, and pass that to poll/sigtimedwait/etc.

# James Antill --
* ^From: .*james@and\.org
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.129 / U:1.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site