On 2/21/22 12:11, Daniel P. Berrangé wrote:
As a point of history, the original code only used sem_t. The pthreads
based fallback was introduced by Paolo in
commit c166cb72f1676855816340666c3b618beef4b976
Author: Paolo Bonzini
Date: Fri Nov 2 15:43:21 2012 +0100
semaphore: imp
; Gonglei
> (Arei)
>
> Subject: Re: [RFC 1/2] sem-posix: remove the posix semaphore support
>
> On Mon, Feb 21, 2022 at 05:56:16PM +0800, Longpeng(Mike) via wrote:
> > POSIX specifies an absolute time for sem_timedwait(), it would be
> > affected if the system time is chan
On Mon, Feb 21, 2022 at 05:56:16PM +0800, Longpeng(Mike) via wrote:
> POSIX specifies an absolute time for sem_timedwait(), it would be
> affected if the system time is changing, but there is not a relative
> time or monotonic clock version of sem_timedwait, so we cannot gain
> from POSIX semaphore
POSIX specifies an absolute time for sem_timedwait(), it would be
affected if the system time is changing, but there is not a relative
time or monotonic clock version of sem_timedwait, so we cannot gain
from POSIX semaphore anymore.
An alternative way is to use sem_trywait + usleep, maybe we can
r