| 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 <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "native_client/src/trusted/service_runtime/nacl_bootstrap_channel_error
_reporter.h" | 9 #include "native_client/src/trusted/service_runtime/nacl_bootstrap_channel_error
_reporter.h" |
| 10 | 10 |
| 11 #include "native_client/src/include/portability.h" | 11 #include "native_client/src/include/portability.h" |
| 12 #include "native_client/src/include/portability_io.h" | 12 #include "native_client/src/include/portability_io.h" |
| 13 #include "native_client/src/include/nacl_macros.h" | 13 #include "native_client/src/include/nacl_macros.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/nrd_xfer.h" | 17 #include "native_client/src/trusted/desc/nrd_xfer.h" |
| 17 #include "native_client/src/trusted/service_runtime/sel_ldr.h" | 18 #include "native_client/src/trusted/service_runtime/sel_ldr.h" |
| 18 | 19 |
| 19 | 20 |
| 20 static struct NaClMutex g_nacl_bootstrap_mu; | 21 static struct NaClMutex g_nacl_bootstrap_mu; |
| 21 | 22 |
| 22 void NaClBootstrapChannelErrorReporterInit(void) { | 23 void NaClBootstrapChannelErrorReporterInit(void) { |
| 23 NaClXMutexCtor(&g_nacl_bootstrap_mu); | 24 NaClXMutexCtor(&g_nacl_bootstrap_mu); |
| 24 } | 25 } |
| 25 | 26 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 rv = (*NACL_VTBL(NaClDesc, channel)->SendMsg)(channel, &hdr, 0); | 83 rv = (*NACL_VTBL(NaClDesc, channel)->SendMsg)(channel, &hdr, 0); |
| 83 if (rv < 0 || (size_t) rv != buf_bytes) { | 84 if (rv < 0 || (size_t) rv != buf_bytes) { |
| 84 fprintf(stderr, | 85 fprintf(stderr, |
| 85 ("NaClBootstrapChannelErrorReporter: SendMsg returned %" | 86 ("NaClBootstrapChannelErrorReporter: SendMsg returned %" |
| 86 NACL_PRIdS", expected %"NACL_PRIuS".\n"), | 87 NACL_PRIdS", expected %"NACL_PRIuS".\n"), |
| 87 rv, buf_bytes); | 88 rv, buf_bytes); |
| 88 } | 89 } |
| 89 } | 90 } |
| 90 /* done / give up */ | 91 /* done / give up */ |
| 91 } | 92 } |
| OLD | NEW |