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 : #include <stdio.h>
8 :
9 : #include "native_client/src/include/portability.h"
10 :
11 : #include "native_client/src/trusted/desc/nrd_all_modules.h"
12 : #include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
13 : #include "native_client/src/trusted/service_runtime/sel_ldr.h"
14 :
15 : int main(void) {
16 1 : struct NaClApp app;
17 1 : int ret_code;
18 :
19 1 : NaClNrdAllModulesInit();
20 1 : ret_code = NaClAppCtor(&app);
21 1 : if (ret_code != 1) {
22 0 : printf("init failed\n");
23 0 : exit(-1);
24 : }
25 :
26 1 : if (app.num_threads != 0) {
27 0 : printf("num_threads init failed\n");
28 0 : exit(-1);
29 : }
30 :
31 1 : NaClRemoveThread(&app, 1);
32 1 : NaClNrdAllModulesFini();
33 :
34 1 : return 0;
35 : }
|