[libcxx-commits] [PATCH] D116944: [libc++] Split a few utilities out of __threading_support

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 14 07:20:50 PST 2022


Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

LGTM FWIW.



================
Comment at: libcxx/include/__chrono/convert_to_timespec.h:26
+// Convert a nanoseconds duration to the given TimeSpec type, which must have
+// the same properties as std::timespec.
+template <class _TimeSpec>
----------------
In fact `__libcpp_timespec_t` is unconditionally a typedef for `::timespec`; so could we just use `::timespec` here?
The template solution isn't too bad, but it still seems like it's working around a problem that shouldn't have been a problem in the first place.


================
Comment at: libcxx/include/module.modulemap:370
       module calendar              { private header "__chrono/calendar.h" }
+      module convert_to_timespec { private header "__thread/convert_to_timespec.h" }
       module duration              { private header "__chrono/duration.h" }
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116944/new/

https://reviews.llvm.org/D116944



More information about the libcxx-commits mailing list