proc_mgmt: fixed several dependency issues
[barrelfish] / include / barrelfish / proc_mgmt_client.h
1 /**
2  * \file
3  * \brief Client for interacting with the process management server.
4  */
5
6 /*
7  * Copyright (c) 2017, ETH Zurich.
8  * All rights reserved.
9  *
10  * This file is distributed under the terms in the attached LICENSE file.
11  * If you do not find this file, copies can be found by writing to:
12  * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13  */
14
15 #ifndef BARRELFISH_PROC_MGMT_CLIENT_H
16 #define BARRELFISH_PROC_MGMT_CLIENT_H
17
18 #include <sys/cdefs.h>
19
20 __BEGIN_DECLS
21
22 struct proc_mgmt_lmp_binding;
23
24
25 /* XXX: duplicate of proc_mgmt_bind_continuation_fn in generated code */
26 typedef void proc_mgmt_bind_continuation_fn(void *st, errval_t err,
27                                             struct proc_mgmt_binding *_binding);
28
29 errval_t proc_mgmt_client_lmp_accept(struct proc_mgmt_lmp_binding *lmpb,
30                                      struct waitset *ws,
31                                      size_t lmp_buflen_words);
32 errval_t proc_mgmt_client_lmp_bind(struct proc_mgmt_lmp_binding *lmpb,
33                                    struct capref ep,
34                                    proc_mgmt_bind_continuation_fn *cont,
35                                    void *st,
36                                    struct waitset *ws,
37                                    size_t lmp_buflen_words);
38 errval_t proc_mgmt_bind_client(void);
39
40 errval_t proc_mgmt_add_spawnd(iref_t iref, coreid_t core_id);
41 errval_t proc_mgmt_spawn_program(coreid_t core_id, const char *path,
42                                      char *const argv[], char *const envp[],
43                                  uint8_t flags, struct capref *ret_domain_cap);
44 errval_t proc_mgmt_spawn_program_with_caps(coreid_t core_id, const char *path,
45                                  char *const argv[], char *const envp[],
46                                  struct capref inheritcn_cap,
47                                  struct capref argcn_cap, uint8_t flags,
48                                  struct capref *ret_domain_cap);
49 errval_t proc_mgmt_span(coreid_t core_id);
50 errval_t proc_mgmt_kill(struct capref domain_cap);
51 errval_t proc_mgmt_exit(uint8_t status);
52 errval_t proc_mgmt_wait(struct capref domain_cap, uint8_t *status);
53
54 __END_DECLS
55
56 #endif // BARRELFISH_PROC_MGMT_CLIENT_H