OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "native_client/src/include/checked_cast.h" | 10 #include "native_client/src/include/checked_cast.h" |
11 #include "native_client/src/shared/platform/nacl_log.h" | 11 #include "native_client/src/shared/platform/nacl_log.h" |
12 | |
13 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 12 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
14 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" | 13 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" |
15 | 14 #include "native_client/src/trusted/plugin/method_map.h" |
16 #include "native_client/src/trusted/plugin/srpc/method_map.h" | 15 #include "native_client/src/trusted/plugin/plugin.h" |
17 #include "native_client/src/trusted/plugin/srpc/plugin.h" | 16 #include "native_client/src/trusted/plugin/srpc_client.h" |
18 #include "native_client/src/trusted/plugin/srpc/srpc_client.h" | 17 #include "native_client/src/trusted/plugin/utility.h" |
19 #include "native_client/src/trusted/plugin/srpc/utility.h" | |
20 | 18 |
21 using nacl::assert_cast; | 19 using nacl::assert_cast; |
22 | 20 |
23 namespace { | 21 namespace { |
24 | 22 |
25 uint32_t ArgsLength(NaClSrpcArg** index) { | 23 uint32_t ArgsLength(NaClSrpcArg** index) { |
26 uint32_t i; | 24 uint32_t i; |
27 for (i = 0; (i < NACL_SRPC_MAX_ARGS) && NULL != index[i]; ++i) { | 25 for (i = 0; (i < NACL_SRPC_MAX_ARGS) && NULL != index[i]; ++i) { |
28 // Empty body. Avoids warning. | 26 // Empty body. Avoids warning. |
29 } | 27 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 185 |
188 void MethodMap::AddMethod(uintptr_t method_id, MethodInfo *info) { | 186 void MethodMap::AddMethod(uintptr_t method_id, MethodInfo *info) { |
189 if (method_map_.find(method_id) != method_map_.end()) { | 187 if (method_map_.find(method_id) != method_map_.end()) { |
190 // the method already exists | 188 // the method already exists |
191 abort(); | 189 abort(); |
192 } | 190 } |
193 method_map_[method_id] = info; | 191 method_map_[method_id] = info; |
194 } | 192 } |
195 | 193 |
196 } // namespace plugin | 194 } // namespace plugin |
OLD | NEW |