]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r327560:
authored <ed@FreeBSD.org>
Thu, 18 Jan 2018 13:43:09 +0000 (13:43 +0000)
committered <ed@FreeBSD.org>
Thu, 18 Jan 2018 13:43:09 +0000 (13:43 +0000)
commitb299fcd9ac0152c5f0b8648847979f5fb92a54a9
tree971337dacb5f2bed23a669aec2a0af95deabe2b0
parent42dd5b99b7420f3f9c5315bcc2868393f1fc19ca
MFC r327560:

  Allow timed waits with relative timeouts on locks and condvars.

  Even though pthreads doesn't support this, there are various alternative
  APIs that use this. For example, uv_cond_timedwait() accepts a relative
  timeout. So does Rust's std::sync::Condvar::wait_timeout().

  Though I personally think that relative timeouts are bad (due to
  imprecision for repeated operations), it does seem that people want
  this. Extend the existing futex functions to keep track of whether an
  absolute timeout is used in a boolean flag.
sys/compat/cloudabi/cloudabi_futex.c
sys/compat/cloudabi/cloudabi_util.h
sys/compat/cloudabi32/cloudabi32_poll.c
sys/compat/cloudabi64/cloudabi64_poll.c