Commit d406bfd6 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[base] Fix the return of ClockNow on IBMi

The API thread_cputime() is only defined but not yet implemented on IBMi.

Change-Id: I8ea7ff724e749f537b54e75a00d718500807ca8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1957831Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65392}
parent fffea681
...@@ -70,6 +70,9 @@ V8_INLINE int64_t ClockNow(clockid_t clk_id) { ...@@ -70,6 +70,9 @@ V8_INLINE int64_t ClockNow(clockid_t clk_id) {
#if defined(V8_OS_AIX) #if defined(V8_OS_AIX)
thread_cputime_t tc; thread_cputime_t tc;
if (clk_id == CLOCK_THREAD_CPUTIME_ID) { if (clk_id == CLOCK_THREAD_CPUTIME_ID) {
#if defined(__PASE__) // CLOCK_THREAD_CPUTIME_ID clock not supported on IBMi
return 0;
#endif
if (thread_cputime(-1, &tc) != 0) { if (thread_cputime(-1, &tc) != 0) {
UNREACHABLE(); UNREACHABLE();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment