2 * \brief Spawnd state internals for the process manager.
4 * Copyright (c) 2017, ETH Zurich.
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.
12 #ifndef SPAWND_STATE_H
13 #define SPAWND_STATE_H
17 #include <if/spawn_defs.h>
18 #include <barrelfish/barrelfish.h>
21 struct msg_queue_elem;
22 typedef bool (*msg_cont_handler_fn)(struct msg_queue_elem*);
24 struct msg_queue_elem {
26 msg_cont_handler_fn cont;
28 struct msg_queue_elem *next;
32 struct msg_queue_elem *head, *tail;
37 struct spawn_binding *b;
39 struct msg_queue queue;
42 errval_t spawnd_state_alloc(coreid_t core_id, struct spawn_binding *b);
43 void spawnd_state_free(coreid_t core_id);
44 bool spawnd_state_exists(coreid_t core_id);
45 struct spawnd_state *spawnd_state_get(coreid_t core_id);
47 errval_t spawnd_state_enqueue_send(struct spawnd_state *spawnd,
48 struct msg_queue_elem *msg);
50 #endif // SPAWND_STATE