| 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 #include "native_client/src/include/concurrency_ops.h" | 9 #include "native_client/src/include/concurrency_ops.h" |
| 10 #include "native_client/src/include/nacl_platform.h" | 10 #include "native_client/src/include/nacl_platform.h" |
| 11 #include "native_client/src/include/portability.h" | 11 #include "native_client/src/include/portability.h" |
| 12 #include "native_client/src/shared/platform/nacl_check.h" | 12 #include "native_client/src/shared/platform/nacl_check.h" |
| 13 #include "native_client/src/shared/platform/nacl_log.h" | 13 #include "native_client/src/shared/platform/nacl_log.h" |
| 14 #include "native_client/src/shared/platform/nacl_sync.h" | 14 #include "native_client/src/shared/platform/nacl_sync.h" |
| 15 #include "native_client/src/shared/platform/nacl_sync_checked.h" | 15 #include "native_client/src/shared/platform/nacl_sync_checked.h" |
| 16 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 16 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
| 17 #include "native_client/src/trusted/desc/nacl_desc_effector.h" | 17 #include "native_client/src/trusted/desc/nacl_desc_effector.h" |
| 18 #include "native_client/src/trusted/desc/nacl_desc_effector_trusted_mem.h" | 18 #include "native_client/src/trusted/desc/nacl_desc_effector_trusted_mem.h" |
| 19 #include "native_client/src/trusted/desc/nacl_desc_imc_shm.h" | 19 #include "native_client/src/trusted/desc/nacl_desc_imc_shm.h" |
| 20 #include "native_client/src/trusted/perf_counter/nacl_perf_counter.h" | 20 #include "native_client/src/trusted/perf_counter/nacl_perf_counter.h" |
| 21 #include "native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h" | 21 #include "native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h" |
| 22 #include "native_client/src/trusted/service_runtime/include/bits/mman.h" |
| 22 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" | 23 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" |
| 23 #include "native_client/src/trusted/service_runtime/include/sys/mman.h" | |
| 24 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" | 24 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" |
| 25 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" | 25 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
| 26 #include "native_client/src/trusted/service_runtime/nacl_text.h" | 26 #include "native_client/src/trusted/service_runtime/nacl_text.h" |
| 27 #include "native_client/src/trusted/service_runtime/sel_ldr.h" | 27 #include "native_client/src/trusted/service_runtime/sel_ldr.h" |
| 28 #include "native_client/src/trusted/service_runtime/sel_memory.h" | 28 #include "native_client/src/trusted/service_runtime/sel_memory.h" |
| 29 | 29 |
| 30 | 30 |
| 31 /* initial size of the malloced buffer for dynamic regions */ | 31 /* initial size of the malloced buffer for dynamic regions */ |
| 32 static const int kMinDynamicRegionsAllocated = 32; | 32 static const int kMinDynamicRegionsAllocated = 32; |
| 33 | 33 |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 /* | 970 /* |
| 971 * Still waiting for some threads to report in... | 971 * Still waiting for some threads to report in... |
| 972 */ | 972 */ |
| 973 retval = -NACL_ABI_EAGAIN; | 973 retval = -NACL_ABI_EAGAIN; |
| 974 } | 974 } |
| 975 | 975 |
| 976 cleanup_unlock: | 976 cleanup_unlock: |
| 977 NaClXMutexUnlock(&nap->dynamic_load_mutex); | 977 NaClXMutexUnlock(&nap->dynamic_load_mutex); |
| 978 return retval; | 978 return retval; |
| 979 } | 979 } |
| OLD | NEW |