[RFC] A more general timeout specification

Inaky Perez-Gonzalez
2005-05-18T22:21:52Z

>>>>> Joe Korty <joe.korty@ccur.com> writes:

> [ for comment only ] The fusyn (robust mutexes) project proposes the
> creation of a more general data structure, 'struct timeout', for the
> specification of timeouts in new services. In this structure, the
> user specifies:

> a time, in timespec format. the clock the time is specified
> against (eg, CLOCK_MONOTONIC). whether the time is absolute, or
> relative to 'now'.

> That is, all combinations of useful timeout attributes become
> possible.
...

The main reason why we are asking for this is that timeouts in POSIX
calls are always specified in an absolute form. Because most system
calls take it in a relative form, glibc has to call the kernel twice
(one to get the time, one to do the syscall with the computed delta).

By having new syscalls that take advantage of this timeout interface,
we can save this extra kernel call.

We believe it is generic enough for interfacing with user space
timeouts, although we'd like to hear feedback :)

--

Inaky