Add spawn, spawn_with_caps and span calls to the Process Manager API.
[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 <if/proc_mgmt_defs.h>
19 #include <sys/cdefs.h>
20
21 __BEGIN_DECLS
22
23 struct proc_mgmt_lmp_binding;
24
25 errval_t proc_mgmt_client_lmp_accept(struct proc_mgmt_lmp_binding *lmpb,
26                                      struct waitset *ws,
27                                      size_t lmp_buflen_words);
28 errval_t proc_mgmt_client_lmp_bind(struct proc_mgmt_lmp_binding *lmpb,
29                                    struct capref ep,
30                                    proc_mgmt_bind_continuation_fn *cont,
31                                    void *st,
32                                    struct waitset *ws,
33                                    size_t lmp_buflen_words);
34 errval_t proc_mgmt_bind_client(void);
35
36 errval_t proc_mgmt_add_spawnd(iref_t iref, coreid_t core_id);
37 errval_t proc_mgmt_spawn_program(coreid_t core_id, const char *path,
38                                      char *const argv[], char *const envp[],
39                                  uint8_t flags, struct capref *ret_domain_cap);
40 errval_t proc_mgmt_spawn_program_with_caps(coreid_t core_id, const char *path,
41                                  char *const argv[], char *const envp[],
42                                  struct capref inheritcn_cap,
43                                  struct capref argcn_cap, uint8_t flags,
44                                  struct capref *ret_domain_cap);
45 errval_t proc_mgmt_span(coreid_t core_id);
46 errval_t proc_mgmt_kill(struct capref domain_cap);
47
48 __END_DECLS
49
50 #endif // BARRELFISH_PROC_MGMT_CLIENT_H