Change proc_mgmt/pending_clients.h to use reply queues instead of hashtables.
[barrelfish] / usr / proc_mgmt / pending_clients.h
index f5c2a4f..9199ef5 100644 (file)
@@ -14,6 +14,9 @@
 
 #include <barrelfish/barrelfish.h>
 #include <if/proc_mgmt_defs.h>
+#include <if/spawn_defs.h>
+
+#include "domain.h"
 
 #define HASH_INDEX_BUCKETS 6151
 
@@ -22,20 +25,51 @@ enum ClientType {
        ClientType_SpawnWithCaps,
        ClientType_Span,
        ClientType_Kill,
-       ClientType_Wait
+       ClientType_Exit,
+       ClientType_Cleanup
        // TODO(razvan): Others?
 };
 
-struct pending_client {
-    struct proc_mgmt_binding *b;
-    coreid_t core_id;
-    enum ClientType type;
+struct pending_spawn {
+    struct capref domain_cap;
+
+       struct spawn_binding *b;
+       coreid_t core_id;
+       
+       const char *path;
+       
+       const char *argvbuf;
+       size_t argvbytes;
+       const char *envbuf;
+       size_t envbytes;
+       
+       struct capref inheritcn_cap;
+       struct capref argcn_cap;
+       
+       uint8_t flags;
 };
 
-errval_t pending_clients_add(struct capref domain_cap,
-                             struct proc_mgmt_binding *b, enum ClientType type,
-                             coreid_t core_id);
-errval_t pending_clients_release(struct capref domain_cap,
-                                 struct pending_client *ret_cl);
+struct pending_span {
+       struct capref domain_cap;
+    struct domain_entry *entry;
+
+       struct spawn_binding *b;
+
+       coreid_t core_id;
+       struct capref vroot;
+       struct capref dispframe;
+};
+
+struct pending_kill_cleanup {
+       struct capref domain_cap;
+    struct domain_entry *entry;
+       struct spawn_binding *b;
+};
+
+struct pending_client {
+       struct proc_mgmt_binding *b;
+       enum ClientType type;
+       void *st;
+};
 
 #endif  // PENDING_CLIENTS_H
\ No newline at end of file