Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: components/nacl/loader/nonsfi/irt_basic.cc

Issue 139303003: Implement nacl_irt_clock for non-sfi mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/loader/nonsfi/abi_conversion.cc ('k') | components/nacl/loader/nonsfi/irt_clock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nonsfi/irt_basic.cc
diff --git a/components/nacl/loader/nonsfi/irt_basic.cc b/components/nacl/loader/nonsfi/irt_basic.cc
index f65ee532b7a1cb7b37dff0de7855c53714bb068f..49fbfe4c14b533757eda5b624e738b22b5864012 100644
--- a/components/nacl/loader/nonsfi/irt_basic.cc
+++ b/components/nacl/loader/nonsfi/irt_basic.cc
@@ -9,6 +9,7 @@
#include <time.h>
#include <unistd.h>
+#include "components/nacl/loader/nonsfi/abi_conversion.h"
#include "components/nacl/loader/nonsfi/irt_interfaces.h"
#include "native_client/src/trusted/service_runtime/include/sys/time.h"
#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
@@ -40,16 +41,13 @@ int IrtClock(nacl_abi_clock_t* ticks) {
int IrtNanoSleep(const struct nacl_abi_timespec* req,
struct nacl_abi_timespec* rem) {
struct timespec host_req;
- host_req.tv_sec = req->tv_sec;
- host_req.tv_nsec = req->tv_nsec;
+ NaClAbiTimeSpecToTimeSpec(*req, &host_req);
struct timespec host_rem;
if (nanosleep(&host_req, &host_rem))
return errno;
- if (rem) {
- rem->tv_sec = host_rem.tv_sec;
- rem->tv_nsec = host_rem.tv_nsec;
- }
+ if (rem)
+ TimeSpecToNaClAbiTimeSpec(host_rem, rem);
return 0;
}
« no previous file with comments | « components/nacl/loader/nonsfi/abi_conversion.cc ('k') | components/nacl/loader/nonsfi/irt_clock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698