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

Side by Side Diff: src/trusted/service_runtime/nacl_syscall_list.c

Issue 891603002: Removes the name service from the service runtime (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Fixes code review comments Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h" 7 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h"
8 #include "native_client/src/trusted/service_runtime/nacl_syscall_handlers.h" 8 #include "native_client/src/trusted/service_runtime/nacl_syscall_handlers.h"
9 #include "native_client/src/trusted/service_runtime/nacl_syscall_register.h" 9 #include "native_client/src/trusted/service_runtime/nacl_syscall_register.h"
10 #include "native_client/src/trusted/service_runtime/nacl_text.h" 10 #include "native_client/src/trusted/service_runtime/nacl_text.h"
11 #include "native_client/src/trusted/service_runtime/sys_exception.h" 11 #include "native_client/src/trusted/service_runtime/sys_exception.h"
12 #include "native_client/src/trusted/service_runtime/sys_fdio.h" 12 #include "native_client/src/trusted/service_runtime/sys_fdio.h"
13 #include "native_client/src/trusted/service_runtime/sys_filename.h" 13 #include "native_client/src/trusted/service_runtime/sys_filename.h"
14 #include "native_client/src/trusted/service_runtime/sys_imc.h" 14 #include "native_client/src/trusted/service_runtime/sys_imc.h"
15 #include "native_client/src/trusted/service_runtime/sys_list_mappings.h" 15 #include "native_client/src/trusted/service_runtime/sys_list_mappings.h"
16 #include "native_client/src/trusted/service_runtime/sys_memory.h" 16 #include "native_client/src/trusted/service_runtime/sys_memory.h"
17 #include "native_client/src/trusted/service_runtime/sys_parallel_io.h" 17 #include "native_client/src/trusted/service_runtime/sys_parallel_io.h"
18 #include "native_client/src/trusted/service_runtime/sys_random.h" 18 #include "native_client/src/trusted/service_runtime/sys_random.h"
19 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h " 19 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h "
20 20
21 /* 21 /*
22 * The following declarations define wrapper functions which read in 22 * The following declarations define wrapper functions which read in
23 * syscall arguments and call the syscall implementation functions listed 23 * syscall arguments and call the syscall implementation functions listed
24 * here. 24 * here.
25 */ 25 */
26 NACL_DEFINE_SYSCALL_0(NaClSysNull) 26 NACL_DEFINE_SYSCALL_0(NaClSysNull)
27 NACL_DEFINE_SYSCALL_1(NaClSysNameService)
28 NACL_DEFINE_SYSCALL_1(NaClSysDup) 27 NACL_DEFINE_SYSCALL_1(NaClSysDup)
29 NACL_DEFINE_SYSCALL_2(NaClSysDup2) 28 NACL_DEFINE_SYSCALL_2(NaClSysDup2)
30 NACL_DEFINE_SYSCALL_3(NaClSysOpen) 29 NACL_DEFINE_SYSCALL_3(NaClSysOpen)
31 NACL_DEFINE_SYSCALL_1(NaClSysClose) 30 NACL_DEFINE_SYSCALL_1(NaClSysClose)
32 NACL_DEFINE_SYSCALL_3(NaClSysRead) 31 NACL_DEFINE_SYSCALL_3(NaClSysRead)
33 NACL_DEFINE_SYSCALL_3(NaClSysWrite) 32 NACL_DEFINE_SYSCALL_3(NaClSysWrite)
34 NACL_DEFINE_SYSCALL_3(NaClSysLseek) 33 NACL_DEFINE_SYSCALL_3(NaClSysLseek)
35 NACL_DEFINE_SYSCALL_2(NaClSysFstat) 34 NACL_DEFINE_SYSCALL_2(NaClSysFstat)
36 NACL_DEFINE_SYSCALL_2(NaClSysStat) 35 NACL_DEFINE_SYSCALL_2(NaClSysStat)
37 NACL_DEFINE_SYSCALL_3(NaClSysGetdents) 36 NACL_DEFINE_SYSCALL_3(NaClSysGetdents)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 NACL_DEFINE_SYSCALL_2(NaClSysFutexWake) 104 NACL_DEFINE_SYSCALL_2(NaClSysFutexWake)
106 NACL_DEFINE_SYSCALL_2(NaClSysGetRandomBytes) 105 NACL_DEFINE_SYSCALL_2(NaClSysGetRandomBytes)
107 106
108 /* 107 /*
109 * This fills in the global table of syscall handlers (nacl_syscall[]), 108 * This fills in the global table of syscall handlers (nacl_syscall[]),
110 * which maps syscall numbers to syscall implementation functions via 109 * which maps syscall numbers to syscall implementation functions via
111 * wrapper functions which read in the syscall arguments. 110 * wrapper functions which read in the syscall arguments.
112 */ 111 */
113 static void RegisterSyscalls(void) { 112 static void RegisterSyscalls(void) {
114 NACL_REGISTER_SYSCALL(NaClSysNull, NACL_sys_null); 113 NACL_REGISTER_SYSCALL(NaClSysNull, NACL_sys_null);
115 NACL_REGISTER_SYSCALL(NaClSysNameService, NACL_sys_nameservice);
116 NACL_REGISTER_SYSCALL(NaClSysDup, NACL_sys_dup); 114 NACL_REGISTER_SYSCALL(NaClSysDup, NACL_sys_dup);
117 NACL_REGISTER_SYSCALL(NaClSysDup2, NACL_sys_dup2); 115 NACL_REGISTER_SYSCALL(NaClSysDup2, NACL_sys_dup2);
118 NACL_REGISTER_SYSCALL(NaClSysOpen, NACL_sys_open); 116 NACL_REGISTER_SYSCALL(NaClSysOpen, NACL_sys_open);
119 NACL_REGISTER_SYSCALL(NaClSysClose, NACL_sys_close); 117 NACL_REGISTER_SYSCALL(NaClSysClose, NACL_sys_close);
120 NACL_REGISTER_SYSCALL(NaClSysRead, NACL_sys_read); 118 NACL_REGISTER_SYSCALL(NaClSysRead, NACL_sys_read);
121 NACL_REGISTER_SYSCALL(NaClSysWrite, NACL_sys_write); 119 NACL_REGISTER_SYSCALL(NaClSysWrite, NACL_sys_write);
122 NACL_REGISTER_SYSCALL(NaClSysLseek, NACL_sys_lseek); 120 NACL_REGISTER_SYSCALL(NaClSysLseek, NACL_sys_lseek);
123 NACL_REGISTER_SYSCALL(NaClSysFstat, NACL_sys_fstat); 121 NACL_REGISTER_SYSCALL(NaClSysFstat, NACL_sys_fstat);
124 NACL_REGISTER_SYSCALL(NaClSysStat, NACL_sys_stat); 122 NACL_REGISTER_SYSCALL(NaClSysStat, NACL_sys_stat);
125 NACL_REGISTER_SYSCALL(NaClSysGetdents, NACL_sys_getdents); 123 NACL_REGISTER_SYSCALL(NaClSysGetdents, NACL_sys_getdents);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int i; 197 int i;
200 for (i = 0; i < NACL_MAX_SYSCALLS; ++i) { 198 for (i = 0; i < NACL_MAX_SYSCALLS; ++i) {
201 nacl_syscall[i].handler = &NaClSysNotImplementedDecoder; 199 nacl_syscall[i].handler = &NaClSysNotImplementedDecoder;
202 } 200 }
203 } 201 }
204 202
205 void NaClSyscallTableInit(void) { 203 void NaClSyscallTableInit(void) {
206 SyscallTableInitEmpty(); 204 SyscallTableInitEmpty();
207 RegisterSyscalls(); 205 RegisterSyscalls();
208 } 206 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_common.c ('k') | src/trusted/service_runtime/name_service/name_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698