apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@apache.org>
Subject Re: No timed lock on MacOS
Date Wed, 05 Apr 2017 14:25:51 GMT
On 05.04.2017 14:16, Jim Jagielski wrote:
> Hmmm.... Looking over the timed stuff, it seems that semtimedop()
> is used incorrectly.
> For both pthread_mutex_timedlock() and sem_timedwait(), the
> timeout variable is the actual wallclock time that the wait
> expires (eg: now+5mins). But, from what I can read about semtimedop(), its
> timeout really is a timeout (5mins). But it seems that we use it
> as if it was wall-clock time, which is WAY wrong...
> Can someone check to see what exactly the timeout value is for
> semtimedop()? Is it a delta or a wall-clock?

My man page says:

    semtimedop() behaves identically to semop() except that in those
    cases where the calling thread would sleep, the duration of that
    sleep is limited by the amount of elapsed time specified by the
    timespec structure whose address is passed in the timeout argument.

Looks like delta to me.

-- Brane

View raw message