[libdispatch-dev] testing tree now ported/automaked and committed
Paolo Bonzini
bonzini at gnu.org
Thu Nov 5 01:28:51 PST 2009
On 11/05/2009 10:18 AM, Robert Watson wrote:
> I plan to spend time investigating dispatch_priority today.
FWIW, my testing showed the same problem with this test.
> There are arguments for/against both approaches, but I was pondering
> adding a non-portable POSIX semaphore extension to FreeBSD supporting
> relative timeouts to avoid additional clock reads to convert between
> the two bases.
Computing relative timeouts from absolute timeouts is problematic
because you never know if the process can be scheduled between the
computation of the delay and the actual invocation of the wait.
Computing absolute timeouts from relative timeouts, instead, never has
this problem.
Since time-fetching syscalls usually have a fastpath on modern OSes, it
would be nice if libdispatch provided a way to specify an absolute timeout.
Paolo
More information about the libdispatch-dev
mailing list