1 : /*
2 : * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 : * Use of this source code is governed by a BSD-style license that can be
4 : * found in the LICENSE file.
5 : */
6 :
7 : /*
8 : * Gather ye all module initializations and finalizations here.
9 : */
10 : #include "native_client/src/shared/srpc/nacl_srpc.h"
11 : #include "native_client/src/trusted/debug_stub/debug_stub.h"
12 : #include "native_client/src/trusted/desc/nrd_all_modules.h"
13 : #include "native_client/src/trusted/fault_injection/fault_injection.h"
14 : #include "native_client/src/trusted/handle_pass/ldr_handle.h"
15 : #include "native_client/src/trusted/service_runtime/nacl_globals.h"
16 : #include "native_client/src/trusted/service_runtime/nacl_syscall_handlers.h"
17 : #include "native_client/src/trusted/service_runtime/nacl_thread_nice.h"
18 : #include "native_client/src/trusted/service_runtime/nacl_tls.h"
19 : #include "native_client/src/trusted/service_runtime/nacl_stack_safety.h"
20 :
21 14 : void NaClAllModulesInit(void) {
22 14 : NaClNrdAllModulesInit();
23 14 : NaClFaultInjectionModuleInit();
24 14 : NaClGlobalModuleInit(); /* various global variables */
25 14 : NaClStackSafetyInit();
26 14 : NaClSrpcModuleInit();
27 14 : NaClTlsInit();
28 14 : NaClSyscallTableInit();
29 14 : NaClThreadNiceInit();
30 : #if NACL_WINDOWS && !defined(NACL_STANDALONE)
31 : NaClHandlePassLdrInit();
32 : #endif
33 14 : }
34 :
35 :
36 9 : void NaClAllModulesFini(void) {
37 9 : NaClNrdAllModulesFini();
38 9 : NaClTlsFini();
39 9 : NaClSrpcModuleFini();
40 9 : NaClStackSafetyFini();
41 9 : NaClGlobalModuleFini();
42 9 : }
|