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

Unified Diff: src/nonsfi/irt/irt_interfaces.c

Issue 686723003: Non-SFI mode: Implement nacl_irt_random only for nacl_helper_nonsfi. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebase Created 6 years, 1 month 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: src/nonsfi/irt/irt_interfaces.c
diff --git a/src/nonsfi/irt/irt_interfaces.c b/src/nonsfi/irt/irt_interfaces.c
index 562d204b71a58f26605fb3d5cbdf71cf0bf45646..8d18464ca8eef005dbe2541904af4b2f5533c7ab 100644
--- a/src/nonsfi/irt/irt_interfaces.c
+++ b/src/nonsfi/irt/irt_interfaces.c
@@ -37,6 +37,7 @@
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/irt/irt_dev.h"
#include "native_client/src/untrusted/irt/irt_interfaces.h"
+#include "native_client/src/untrusted/nacl/nacl_random.h"
/*
* This is an implementation of NaCl's IRT interfaces that runs
@@ -599,6 +600,10 @@ const struct nacl_irt_futex nacl_irt_futex = {
};
#endif
+const struct nacl_irt_random nacl_irt_random = {
+ nacl_secure_random,
+};
+
#if defined(__linux__) || defined(__native_client__)
const struct nacl_irt_clock nacl_irt_clock = {
irt_clock_getres,
@@ -650,6 +655,7 @@ static const struct nacl_irt_interface irt_interfaces[] = {
{ NACL_IRT_TLS_v0_1, &nacl_irt_tls, sizeof(nacl_irt_tls), NULL },
{ NACL_IRT_THREAD_v0_1, &nacl_irt_thread, sizeof(nacl_irt_thread), NULL },
{ NACL_IRT_FUTEX_v0_1, &nacl_irt_futex, sizeof(nacl_irt_futex), NULL },
+ { NACL_IRT_RANDOM_v0_1, &nacl_irt_random, sizeof(nacl_irt_random), NULL },
#if defined(__linux__) || defined(__native_client__)
{ NACL_IRT_CLOCK_v0_1, &nacl_irt_clock, sizeof(nacl_irt_clock), NULL },
#endif
« no previous file with comments | « src/nonsfi/irt/irt.gyp ('k') | src/nonsfi/irt/irt_random.h » ('j') | src/nonsfi/irt/irt_random.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698