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

Unified Diff: src/untrusted/irt/irt_pnacl_translator.c

Issue 984713003: Add an IRT interface for subzero/compiler to serve_translate_requests. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: c void Created 5 years, 9 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 | « src/untrusted/irt/irt_interfaces.c ('k') | src/untrusted/irt/irt_pnacl_translator_compile.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/irt_pnacl_translator.c
diff --git a/src/untrusted/irt/irt_pnacl_translator.c b/src/untrusted/irt/irt_pnacl_translator.c
deleted file mode 100644
index 4ed99359fc01b92d2b1114f24db05b5abeb8c96c..0000000000000000000000000000000000000000
--- a/src/untrusted/irt/irt_pnacl_translator.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2015 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "native_client/src/shared/platform/nacl_log.h"
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "native_client/src/untrusted/irt/irt_dev.h"
-#include "native_client/src/untrusted/irt/irt_interfaces.h"
-
-static const int kMaxObjectFiles = 16;
-
-static int (*g_func)(int nexe_fd,
- const int *obj_file_fds,
- int obj_file_fd_count);
-
-static void handle_link_request(NaClSrpcRpc *rpc,
- NaClSrpcArg **in_args,
- NaClSrpcArg **out_args,
- NaClSrpcClosure *done) {
- int obj_file_count = in_args[0]->u.ival;
- int nexe_fd = in_args[kMaxObjectFiles + 1]->u.hval;
-
- if (obj_file_count < 1 || obj_file_count > kMaxObjectFiles) {
- NaClLog(LOG_FATAL, "Bad object file count (%i)\n", obj_file_count);
- }
- int obj_file_fds[obj_file_count];
- for (int i = 0; i < obj_file_count; i++) {
- obj_file_fds[i] = in_args[i + 1]->u.hval;
- }
-
- int result = g_func(nexe_fd, obj_file_fds, obj_file_count);
-
- rpc->result = result == 0 ? NACL_SRPC_RESULT_OK : NACL_SRPC_RESULT_APP_ERROR;
- done->Run(done);
-}
-
-static const struct NaClSrpcHandlerDesc srpc_methods[] = {
- { "RunWithSplit:ihhhhhhhhhhhhhhhhh:", handle_link_request },
- { NULL, NULL },
-};
-
-static void serve_link_request(int (*func)(int nexe_fd,
- const int *obj_file_fds,
- int obj_file_fd_count)) {
- g_func = func;
- if (!NaClSrpcModuleInit()) {
- NaClLog(LOG_FATAL, "NaClSrpcModuleInit() failed\n");
- }
- NaClSrpcAcceptClientConnection(srpc_methods);
-}
-
-const struct nacl_irt_private_pnacl_translator_link
- nacl_irt_private_pnacl_translator_link = {
- serve_link_request,
-};
« no previous file with comments | « src/untrusted/irt/irt_interfaces.c ('k') | src/untrusted/irt/irt_pnacl_translator_compile.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698