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 : void NaClPlatformInit(void) {
14 329 : NaClLogModuleInit();
15 329 : NaClTimeInit();
16 329 : if (!NaClClockInit()) {
17 0 : NaClLog(LOG_FATAL, "NaClPlatformInit: NaClClockInit failed\n");
18 0 : }
19 329 : NaClSecureRngModuleInit();
20 329 : NaClGlobalSecureRngInit();
21 329 : }
22 :
23 : void NaClPlatformFini(void) {
24 53 : NaClGlobalSecureRngFini();
25 53 : NaClSecureRngModuleFini();
26 53 : NaClClockFini();
27 53 : NaClTimeFini();
28 53 : NaClLogModuleFini();
29 53 : }
|