a proposed callout API

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Nov 29 11:45:50 PST 2006


In message <200611291346.01246.jhb at freebsd.org>, John Baldwin writes:

>Different APIs would be fine.  IIRC, that's how Darwin does it.  With the
>tick_t idea, you could easily have:
>
>tick_t relative_wakeup(ulong nsec)
>tick_t absolute_wakeup(struct timeval *tv) (or something else, etc.)

I really do not want to encode the rel/abs aspect in the tick_t.

I want it marked up directly in the flags passed which kind of behaviour
the code wants.

>walltime timeouts (such as for TCP as Poul-Henning mentioned).  I like tick_t,
>I just want to make sure we change foosleep() to use it as well, and wanted to
>raise the idea of relative vs absolute deadlines.

Agreed, foosleep() should take tick_t as well.

I propose you and I write up the new API in detail and then present
that document here on arch@ at a latter date.

Is that OK with you ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list