Title: [246809] trunk/Source/WTF
Revision
246809
Author
[email protected]
Date
2019-06-25 14:35:03 -0700 (Tue, 25 Jun 2019)

Log Message

[fuchsia] Update to newer zx_clock_get syscall
https://bugs.webkit.org/show_bug.cgi?id=199191

Reviewed by Sam Weinig.

Fuchsia has changed the zx_clock_get syscall to return the clock value
via an out parameter rather than via its return value. This change
makes zx_clock_get consistent with all the other syscalls.

This patch updates our use of zx_clock_get to use the new syscall. The
old syscall is no longer supported by Fuchsia.

* wtf/fuchsia/CPUTimeFuchsia.cpp:
(WTF::CPUTime::get): Switch to using the out parameter.
(WTF::CPUTime::forCurrentThread): Switch to using the out parameter.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (246808 => 246809)


--- trunk/Source/WTF/ChangeLog	2019-06-25 21:19:21 UTC (rev 246808)
+++ trunk/Source/WTF/ChangeLog	2019-06-25 21:35:03 UTC (rev 246809)
@@ -1,3 +1,21 @@
+2019-06-25  Adam Barth  <[email protected]>
+
+        [fuchsia] Update to newer zx_clock_get syscall
+        https://bugs.webkit.org/show_bug.cgi?id=199191
+
+        Reviewed by Sam Weinig.
+
+        Fuchsia has changed the zx_clock_get syscall to return the clock value
+        via an out parameter rather than via its return value. This change
+        makes zx_clock_get consistent with all the other syscalls.
+
+        This patch updates our use of zx_clock_get to use the new syscall. The
+        old syscall is no longer supported by Fuchsia.
+
+        * wtf/fuchsia/CPUTimeFuchsia.cpp:
+        (WTF::CPUTime::get): Switch to using the out parameter.
+        (WTF::CPUTime::forCurrentThread): Switch to using the out parameter.
+
 2019-06-25  Michael Catanzaro  <[email protected]>
 
         Fully rename WebKitGTK+ -> WebKitGTK everywhere

Modified: trunk/Source/WTF/wtf/fuchsia/CPUTimeFuchsia.cpp (246808 => 246809)


--- trunk/Source/WTF/wtf/fuchsia/CPUTimeFuchsia.cpp	2019-06-25 21:19:21 UTC (rev 246808)
+++ trunk/Source/WTF/wtf/fuchsia/CPUTimeFuchsia.cpp	2019-06-25 21:35:03 UTC (rev 246809)
@@ -41,7 +41,8 @@
     // Fuchsia issue ZX-2318 tracks being able to get the monotonic and thread
     // times atomically and being able to separate ZX_CLOCK_THREAD into user and
     // kernel time.
-    zx_time_t thread = zx_clock_get(ZX_CLOCK_THREAD);
+    zx_time_t thread = 0;
+    zx_clock_get(ZX_CLOCK_THREAD, &thread);
 
     return CPUTime { MonotonicTime::now(), timeToSeconds(thread), Seconds() };
 }
@@ -48,7 +49,9 @@
 
 Seconds CPUTime::forCurrentThread()
 {
-    return timeToSeconds(zx_clock_get(ZX_CLOCK_THREAD));
+    zx_time_t thread = 0;
+    zx_clock_get(ZX_CLOCK_THREAD, &thread)
+    return timeToSeconds(thread);
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to