OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The Native Client Authors. All rights reserved. | 2 * Copyright 2015 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 NACL_SPAWN_NACL_SPAWN_H_ | 7 #ifndef NACL_SPAWN_NACL_SPAWN_H_ |
8 #define NACL_SPAWN_NACL_SPAWN_H_ | 8 #define NACL_SPAWN_NACL_SPAWN_H_ |
9 | 9 |
10 /* | 10 /* |
11 * Internal nacl_spawn functions | 11 * Internal nacl_spawn functions |
12 */ | 12 */ |
13 | 13 |
14 #include <stdbool.h> | 14 #include <stdbool.h> |
15 #include <sys/cdefs.h> | 15 #include <sys/cdefs.h> |
16 | 16 |
17 #include "ppapi/c/ppb_var.h" | 17 #include "ppapi/c/ppb_var.h" |
18 #include "ppapi/c/ppb_var_array.h" | 18 #include "ppapi/c/ppb_var_array.h" |
19 #include "ppapi/c/ppb_var_dictionary.h" | 19 #include "ppapi/c/ppb_var_dictionary.h" |
20 #include "nacl_io/log.h" | 20 #include "nacl_io/log.h" |
21 | 21 |
22 #ifdef NSPAWN_LOGGING | 22 #ifdef NSPAWN_LOGGING |
23 #define NSPAWN_LOG_PREFIX "nspawn: " | 23 #define NSPAWN_LOG_PREFIX "nspawn: " |
24 #define NSPAWN_LOG(format, ...) \ | 24 #define NSPAWN_LOG(format, ...) \ |
25 nacl_io_log(NSPAWN_LOG_PREFIX format "\n", ##__VA_ARGS__) | 25 nacl_io_log(NSPAWN_LOG_PREFIX format "\n", ##__VA_ARGS__) |
26 #else | 26 #else |
27 #define NSPAWN_LOG(format, ...) | 27 #define NSPAWN_LOG(format, ...) |
28 #endif | 28 #endif |
29 | 29 |
| 30 #define LOADER_NAME "nacl_spawn" |
| 31 |
30 __BEGIN_DECLS | 32 __BEGIN_DECLS |
31 | 33 |
32 void nspawn_var_release(struct PP_Var var); | 34 void nspawn_var_release(struct PP_Var var); |
33 | 35 |
34 /* Array helpers */ | 36 /* Array helpers */ |
35 struct PP_Var nspawn_array_create(void); | 37 struct PP_Var nspawn_array_create(void); |
36 void nspawn_array_insertstring(struct PP_Var array, uint32_t index, | 38 void nspawn_array_insertstring(struct PP_Var array, uint32_t index, |
37 const char* value); | 39 const char* value); |
38 void nspawn_array_setstring(struct PP_Var array, uint32_t index, | 40 void nspawn_array_setstring(struct PP_Var array, uint32_t index, |
39 const char* value); | 41 const char* value); |
(...skipping 17 matching lines...) Expand all Loading... |
57 struct PP_Var nspawn_send_request(struct PP_Var req_var); | 59 struct PP_Var nspawn_send_request(struct PP_Var req_var); |
58 | 60 |
59 int nspawn_setup_anonymous_pipes(void); | 61 int nspawn_setup_anonymous_pipes(void); |
60 | 62 |
61 extern int nspawn_pid; | 63 extern int nspawn_pid; |
62 extern int nspawn_ppid; | 64 extern int nspawn_ppid; |
63 | 65 |
64 __END_DECLS | 66 __END_DECLS |
65 | 67 |
66 #endif /* NACL_SPAWN_NACL_SPAWN_H_ */ | 68 #endif /* NACL_SPAWN_NACL_SPAWN_H_ */ |
OLD | NEW |