| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 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 <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 /* | 9 /* |
| 10 * NaCl Simple/secure ELF loader (NaCl SEL). | 10 * NaCl Simple/secure ELF loader (NaCl SEL). |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 nap->enable_faulted_thread_queue = 0; | 268 nap->enable_faulted_thread_queue = 0; |
| 269 nap->faulted_thread_count = 0; | 269 nap->faulted_thread_count = 0; |
| 270 #if NACL_WINDOWS | 270 #if NACL_WINDOWS |
| 271 nap->faulted_thread_event = INVALID_HANDLE_VALUE; | 271 nap->faulted_thread_event = INVALID_HANDLE_VALUE; |
| 272 #else | 272 #else |
| 273 nap->faulted_thread_fd_read = -1; | 273 nap->faulted_thread_fd_read = -1; |
| 274 nap->faulted_thread_fd_write = -1; | 274 nap->faulted_thread_fd_write = -1; |
| 275 #endif | 275 #endif |
| 276 | 276 |
| 277 | 277 |
| 278 #if NACL_LINUX || NACL_OSX | 278 #if NACL_WINDOWS |
| 279 nap->sc_nprocessors_onln = 0; |
| 280 #elif NACL_LINUX || NACL_OSX |
| 279 /* | 281 /* |
| 280 * Try to pre-cache information that we can't obtain with the outer | 282 * Try to pre-cache information that we can't obtain with the outer |
| 281 * sandbox on. If the outer sandbox has already been enabled, this | 283 * sandbox on. If the outer sandbox has already been enabled, this |
| 282 * will just set sc_nprocessors_onln to -1, and it is the | 284 * will just set sc_nprocessors_onln to -1, and it is the |
| 283 * responsibility of the caller to replace this with a sane value | 285 * responsibility of the caller to replace this with a sane value |
| 284 * after the Ctor returns. | 286 * after the Ctor returns. |
| 285 */ | 287 */ |
| 286 nap->sc_nprocessors_onln = sysconf(_SC_NPROCESSORS_ONLN); | 288 nap->sc_nprocessors_onln = sysconf(_SC_NPROCESSORS_ONLN); |
| 287 #endif | 289 #endif |
| 288 | 290 |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 nacl_global_xlate_base = mem_start; | 1313 nacl_global_xlate_base = mem_start; |
| 1312 | 1314 |
| 1313 NaClSandboxMemoryStartForValgrind(mem_start); | 1315 NaClSandboxMemoryStartForValgrind(mem_start); |
| 1314 | 1316 |
| 1315 _ovly_debug_event(); | 1317 _ovly_debug_event(); |
| 1316 } | 1318 } |
| 1317 | 1319 |
| 1318 void NaClGdbHook(struct NaClApp const *nap) { | 1320 void NaClGdbHook(struct NaClApp const *nap) { |
| 1319 StopForDebuggerInit(nap->mem_start); | 1321 StopForDebuggerInit(nap->mem_start); |
| 1320 } | 1322 } |
| OLD | NEW |