| 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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ | 8 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ |
| 9 | 9 |
| 10 #include "native_client/src/include/nacl_base.h" | 10 #include "native_client/src/include/nacl_base.h" |
| 11 #include "native_client/src/trusted/service_runtime/sel_ldr.h" | 11 #include "native_client/src/trusted/service_runtime/sel_ldr.h" |
| 12 #include "native_client/src/trusted/simple_service/nacl_simple_service.h" | 12 #include "native_client/src/trusted/simple_service/nacl_simple_service.h" |
| 13 #include "native_client/src/trusted/simple_service/nacl_simple_rservice.h" | 13 #include "native_client/src/trusted/simple_service/nacl_simple_rservice.h" |
| 14 | 14 |
| 15 EXTERN_C_BEGIN | 15 EXTERN_C_BEGIN |
| 16 | 16 |
| 17 struct NaClApp; | 17 struct NaClApp; |
| 18 | 18 |
| 19 /* | 19 /* |
| 20 * Secure channel. | 20 * Secure channel. |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 struct NaClSecureService { | 23 struct NaClSecureService { |
| 24 struct NaClSimpleService base NACL_IS_REFCOUNT_SUBCLASS; | 24 struct NaClSimpleService base NACL_IS_REFCOUNT_SUBCLASS; |
| 25 struct NaClApp *nap; | 25 struct NaClApp *nap; |
| 26 | 26 |
| 27 struct NaClMutex mu; | 27 struct NaClMutex mu; |
| 28 /* | 28 /* |
| 29 * |mu| protects the thread count access. | 29 * |mu| protects the connection count access. |
| 30 */ | 30 */ |
| 31 uint32_t thread_count; | 31 uint32_t conn_count; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 int NaClSecureServiceCtor( | 34 int NaClSecureServiceCtor( |
| 35 struct NaClSecureService *self, | 35 struct NaClSecureService *self, |
| 36 struct NaClSrpcHandlerDesc const *srpc_handlers, | 36 struct NaClSrpcHandlerDesc const *srpc_handlers, |
| 37 struct NaClApp *nap, | 37 struct NaClApp *nap, |
| 38 struct NaClDesc *service_port, | 38 struct NaClDesc *service_port, |
| 39 struct NaClDesc *sock_addr); | 39 struct NaClDesc *sock_addr); |
| 40 | 40 |
| 41 void NaClSecureServiceDtor(struct NaClRefCount *vself); | 41 void NaClSecureServiceDtor(struct NaClRefCount *vself); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void *state) NACL_WUR; | 89 void *state) NACL_WUR; |
| 90 | 90 |
| 91 struct NaClSecureRevClientConnHandler *NaClSecureReverseClientRemoveHandler( | 91 struct NaClSecureRevClientConnHandler *NaClSecureReverseClientRemoveHandler( |
| 92 struct NaClSecureReverseClient *self); | 92 struct NaClSecureReverseClient *self); |
| 93 | 93 |
| 94 extern struct NaClSecureReverseClientVtbl const kNaClSecureReverseClientVtbl; | 94 extern struct NaClSecureReverseClientVtbl const kNaClSecureReverseClientVtbl; |
| 95 | 95 |
| 96 EXTERN_C_END | 96 EXTERN_C_END |
| 97 | 97 |
| 98 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ */ | 98 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_SECURE_SERVICE_H_ */ |
| OLD | NEW |