Change proc_mgmt/pending_clients.h to use reply queues instead of hashtables.
[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 #include <if/spawn_defs.h>
18
19 #include "domain.h"
20
21 #define HASH_INDEX_BUCKETS 6151
22
23 enum ClientType {
24         ClientType_Spawn,
25         ClientType_SpawnWithCaps,
26         ClientType_Span,
27         ClientType_Kill,
28         ClientType_Exit,
29         ClientType_Cleanup
30         // TODO(razvan): Others?
31 };
32
33 struct pending_spawn {
34     struct capref domain_cap;
35
36         struct spawn_binding *b;
37         coreid_t core_id;
38         
39         const char *path;
40         
41         const char *argvbuf;
42         size_t argvbytes;
43         const char *envbuf;
44         size_t envbytes;
45         
46         struct capref inheritcn_cap;
47         struct capref argcn_cap;
48         
49         uint8_t flags;
50 };
51
52 struct pending_span {
53         struct capref domain_cap;
54     struct domain_entry *entry;
55
56         struct spawn_binding *b;
57
58         coreid_t core_id;
59         struct capref vroot;
60         struct capref dispframe;
61 };
62
63 struct pending_kill_cleanup {
64         struct capref domain_cap;
65     struct domain_entry *entry;
66         struct spawn_binding *b;
67 };
68
69 struct pending_client {
70         struct proc_mgmt_binding *b;
71         enum ClientType type;
72         void *st;
73 };
74
75 #endif  // PENDING_CLIENTS_H