[libcxx-commits] [PATCH] D117585: [libcxx] Support waiting on steady clock with ext. threading

Mikhail Maltsev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 18 10:35:33 PST 2022


miyuki created this revision.
miyuki added a reviewer: ldionne.
miyuki requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This patch adds support for using the steady (monotonic) clock when
waiting on a condition variable with a timeout. This feature is
currently implemented for POSIX threads. The patch generalizes it to
be usable with an external threading library by adding a new
function __libcpp_condvar_steady_timedwait.

      

External threading layer implementors should define
_LIBCPP_HAS_COND_STEADY_TIMEDWAIT in their __external_threading
header and implement the __libcpp_condvar_steady_timedwait function
to use the feature.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117585

Files:
  libcxx/include/__config
  libcxx/include/__mutex_base
  libcxx/include/__threading_support

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117585.400908.patch
Type: text/x-patch
Size: 4331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220118/804fea10/attachment.bin>


More information about the libcxx-commits mailing list