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

Unified Diff: sysdeps/nacl/clock_gettime.c

Issue 9389024: plumb glibc clock_get interfaces to irt (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: enable fallbacks Created 8 years, 10 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
Index: sysdeps/nacl/clock_gettime.c
diff --git a/sysdeps/nacl/clock_gettime.c b/sysdeps/nacl/clock_gettime.c
new file mode 100644
index 0000000000000000000000000000000000000000..62964263e40e45438b2ddf322f567736a5012b5b
--- /dev/null
+++ b/sysdeps/nacl/clock_gettime.c
@@ -0,0 +1,25 @@
+#include <errno.h>
+#include <time.h>
+
+#include <irt_syscalls.h>
+
+#define SYSDEP_GETTIME \
+ case CLOCK_REALTIME: \
+ case CLOCK_MONOTONIC: \
+ { \
+ int result = __nacl_irt_clock_gettime (clock_id, tp); \
+ if (result != 0) \
+ { \
Roland McGrath 2012/02/15 18:45:26 Indent block.
bsy 2012/02/15 19:33:29 Done.
+ __set_errno (result); \
+ retval = -1; \
+ } \
+ else \
+ { \
Roland McGrath 2012/02/15 18:45:26 Drop braces.
bsy 2012/02/15 19:33:29 Done.
+ retval = 0; \
+ } \
+ } \
+ break;
+
+#define HANDLED_REALTIME
+
+#include <sysdeps/unix/clock_gettime.c>

Powered by Google App Engine
This is Rietveld 408576698