[libcxx-commits] [PATCH] D93542: [SystemZ][ZOS] Provide CLOCK_MONOTONIC alternative

Hubert Tong via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 25 20:47:03 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: libcxx/include/support/ibm/gettod.h:15
+
+inline int gettimeofdayMonotonic(struct timespec64* Output) {
+
----------------
Adding an external linkage symbol is a layer of complication that I don't think is needed here.


================
Comment at: libcxx/include/support/ibm/gettod.h:33
+  if (CC != 0) {
+    errno = EPERM;
+    return CC;
----------------
It seems there's specifically `EMVSTODNOTSET`


================
Comment at: libcxx/include/support/ibm/gettod.h:41-42
+
+  uint64_t DivPair0 = 0;
+  uint64_t DivPair1 = us;
+  uint64_t Divisor = 1000000;
----------------
Comments could help.


================
Comment at: libcxx/src/chrono.cpp:24
+#if defined(__MVS__)
+#include <support/ibm/gettod.h>
+#endif
----------------
Should the header be top-level for "support/ibm/"? Perhaps it should be named to indicate that it is for z/OS.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93542



More information about the libcxx-commits mailing list