Date: Sat, 22 Dec 2012 22:57:54 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Jilles Tjoelker <jilles@stack.nl> Cc: Davide Italiano <davide@FreeBSD.org>, Ian Lepore <freebsd@damnhippie.dyndns.org>, Alexander Motin <mav@FreeBSD.org>, freebsd-current <freebsd-current@FreeBSD.org>, "freebsd-arch@freebsd.org" <freebsd-arch@FreeBSD.org> Subject: Re: API explosion (Re: [RFC/RFT] calloutng) Message-ID: <2071.1356217074@critter.freebsd.dk> In-Reply-To: <20121222225025.GA46583@stack.nl> References: <50CF88B9.6040004@FreeBSD.org> <20121218173643.GA94266@onelab2.iet.unipi.it> <50D0B00D.8090002@FreeBSD.org> <50D0E42B.6030605@FreeBSD.org> <20121218225823.GA96962@onelab2.iet.unipi.it> <1355873265.1198.183.camel@revolution.hippie.lan> <14604.1355910848@critter.freebsd.dk> <CACYV=-Eg542iHm9KfujPvCzZrA4TqepEBVA8RzT1YOHnCgfJnA@mail.gmail.com> <50D192E8.3020704@FreeBSD.org> <15947.1355914806@critter.freebsd.dk> <20121222225025.GA46583@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <20121222225025.GA46583@stack.nl>, Jilles Tjoelker writes: >> Either way, such a facility should be layered on top of the callout >> facility, which should always run in "elapsed time"[1] with no attention >> paid to what NTPD might do to the UTC estimate. > >POSIX specifies functions that assume such a facility exists, although >applications may not care much if we implement them incorrectly. It should still be implemented op top of callouts, not as part of: it is an entirely different thing to try to do right. >> I think it prudent to specify a flag to callouts, to tell what >> should happen on suspend/resume, something like: > >> SR_CANCEL /* Cancel the callout on S/R */ >> /* no flag* /* Toll this callout only when system is running */ >> SR_IGNORE /* Toll suspended time from callout */ > >> If you get this right, callouts from device drivers will just "DTRT", >> if you get it wrong, all device drivers will need boilerplate code >> to handle S/R > >Userland could get access to this via CLOCK_REALTIME vs CLOCK_MONOTONIC >vs CLOCK_UPTIME. I have _no_ idea what you are trying to say here... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2071.1356217074>