| 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 /* | 7 /* |
| 8 * NaCl Service Runtime. Transferrable shared memory objects. | 8 * NaCl Service Runtime. Transferrable shared memory objects. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "native_client/src/include/portability.h" | 11 #include "native_client/src/include/portability.h" |
| 12 #include "native_client/src/include/nacl_platform.h" | 12 #include "native_client/src/include/nacl_platform.h" |
| 13 | 13 |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 #include <string.h> | 15 #include <string.h> |
| 16 | 16 |
| 17 #include "native_client/src/shared/imc/nacl_imc_c.h" | 17 #include "native_client/src/shared/imc/nacl_imc_c.h" |
| 18 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 18 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
| 19 #include "native_client/src/trusted/desc/nacl_desc_effector.h" | 19 #include "native_client/src/trusted/desc/nacl_desc_effector.h" |
| 20 #include "native_client/src/trusted/desc/nacl_desc_io.h" | 20 #include "native_client/src/trusted/desc/nacl_desc_io.h" |
| 21 #include "native_client/src/trusted/desc/nacl_desc_imc_shm.h" | 21 #include "native_client/src/trusted/desc/nacl_desc_imc_shm.h" |
| 22 | 22 |
| 23 #include "native_client/src/shared/platform/nacl_find_addrsp.h" | 23 #include "native_client/src/shared/platform/nacl_find_addrsp.h" |
| 24 #include "native_client/src/shared/platform/nacl_host_desc.h" | 24 #include "native_client/src/shared/platform/nacl_host_desc.h" |
| 25 #include "native_client/src/shared/platform/nacl_log.h" | 25 #include "native_client/src/shared/platform/nacl_log.h" |
| 26 #include "native_client/src/shared/platform/nacl_sync_checked.h" | 26 #include "native_client/src/shared/platform/nacl_sync_checked.h" |
| 27 | 27 |
| 28 #include "native_client/src/trusted/service_runtime/include/bits/mman.h" |
| 28 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" | 29 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" |
| 29 #include "native_client/src/trusted/service_runtime/include/sys/mman.h" | |
| 30 #include "native_client/src/trusted/service_runtime/include/sys/stat.h" | 30 #include "native_client/src/trusted/service_runtime/include/sys/stat.h" |
| 31 #include "native_client/src/trusted/service_runtime/internal_errno.h" | 31 #include "native_client/src/trusted/service_runtime/internal_errno.h" |
| 32 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 32 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
| 33 | 33 |
| 34 #ifndef SIZE_T_MAX | 34 #ifndef SIZE_T_MAX |
| 35 # define SIZE_T_MAX (~(size_t) 0) | 35 # define SIZE_T_MAX (~(size_t) 0) |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 /* | 38 /* |
| 39 * This file contains the implementation of the NaClDescImcShm | 39 * This file contains the implementation of the NaClDescImcShm |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 *out_desc = (struct NaClDesc *) ndisp; | 361 *out_desc = (struct NaClDesc *) ndisp; |
| 362 rv = 0; | 362 rv = 0; |
| 363 | 363 |
| 364 cleanup: | 364 cleanup: |
| 365 if (rv < 0) { | 365 if (rv < 0) { |
| 366 free(ndisp); | 366 free(ndisp); |
| 367 } | 367 } |
| 368 return rv; | 368 return rv; |
| 369 } | 369 } |
| OLD | NEW |