Implement kill_request_handler in spawnd, using domain caps.
[barrelfish] / usr / proc_mgmt / pending_clients.h
1 /*
2  * \brief Client handling internals for the process manager.
3  *
4  * Copyright (c) 2017, ETH Zurich.
5  * All rights reserved.
6  *
7  * This file is distributed under the terms in the attached LICENSE file.
8  * If you do not find this file, copies can be found by writing to:
9  * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
10  */
11
12 #ifndef PENDING_CLIENTS_H
13 #define PENDING_CLIENTS_H
14
15 #include <barrelfish/barrelfish.h>
16 #include <if/proc_mgmt_defs.h>
17
18 #define HASH_INDEX_BUCKETS 6151
19
20 enum ClientType {
21         ClientType_Spawn,
22         ClientType_SpawnWithCaps,
23         ClientType_Span,
24         ClientType_Kill,
25         ClientType_Wait
26         // TODO(razvan): Others?
27 };
28
29 struct pending_client {
30     struct proc_mgmt_binding *b;
31     coreid_t core_id;
32     enum ClientType type;
33 };
34
35 errval_t pending_clients_add(struct capref domain_cap,
36                              struct proc_mgmt_binding *b, enum ClientType type,
37                              coreid_t core_id);
38 errval_t pending_clients_release(struct capref domain_cap,
39                                  struct pending_client **ret_cl);
40
41 #endif  // PENDING_CLIENTS_H