[Openmp-commits] [openmp] [openmp][AIX]Initial changes for porting to AIX (PR #76841)

Brad Smith via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 3 15:45:43 PST 2024


================
@@ -62,6 +64,18 @@
 #include <sys/sysctl.h>
 #elif KMP_OS_SOLARIS
 #include <sys/loadavg.h>
+#elif KMP_OS_AIX
+// These macros are not defined in AIX system headers.
+#define TIMEVAL_TO_TIMESPEC(tv, ts)                                            \
+  {                                                                            \
+    (ts)->tv_sec = (tv)->tv_sec;                                               \
+    (ts)->tv_nsec = (tv)->tv_usec * 1000;                                      \
+  }
+#define TIMESPEC_TO_TIMEVAL(tv, ts)                                            \
+  {                                                                            \
+    (tv)->tv_sec = (ts)->tv_sec;                                               \
+    (tv)->tv_usec = (ts)->tv_nsec / 1000;                                      \
+  }
----------------
brad0 wrote:

TIMESPEC_TO_TIMEVAL is not used in this code and there is a copy of TIMEVAL_TO_TIMESPEC just a few lines below this.

https://github.com/llvm/llvm-project/pull/76841


More information about the Openmp-commits mailing list