1 : /*
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
4 : * found in the LICENSE file.
5 : */
6 :
7 : #include "native_client/src/shared/platform/nacl_clock.h"
8 : #include "native_client/src/shared/platform/nacl_log.h"
9 : #include "native_client/src/shared/platform/nacl_time.h"
10 : #include "native_client/src/shared/platform/nacl_secure_random.h"
11 : #include "native_client/src/shared/platform/nacl_global_secure_random.h"
12 :
13 348 : void NaClPlatformInit(void) {
14 348 : NaClLogModuleInit();
15 348 : NaClTimeInit();
16 348 : if (!NaClClockInit()) {
17 0 : NaClLog(LOG_FATAL, "NaClPlatformInit: NaClClockInit failed\n");
18 : }
19 348 : NaClSecureRngModuleInit();
20 348 : NaClGlobalSecureRngInit();
21 348 : }
22 :
23 52 : void NaClPlatformFini(void) {
24 52 : NaClGlobalSecureRngFini();
25 52 : NaClSecureRngModuleFini();
26 52 : NaClClockFini();
27 52 : NaClTimeFini();
28 52 : NaClLogModuleFini();
29 52 : }
|